Detecting the last frame

Troy Watson <[email protected]> Sun, 27 Sep 2009 17:43:42 +1000
Newsgroups gmane.comp.audio.mad.devel
Message-ID <[email protected]>
Hi all,

Is there a method to detect if the frame sent to mad_synth_frame is
the last frame in the stream, without knowing in advance how many
frames the input stream has?  I am using libsamplerate and it requires
the last block of audio data for a stream to set an end_of_input flag.
Checking the EOF indicator for the input file is insufficient as that
only informs me when the file has been fully buffered, not when the
last frame has been synthesized. Any ideas or suggestions?