}
}
-void
+/** Try to get `frames' frames of audio and copy it into `out'. Silence
+ * will be filled if no audio is available.
+ * @return true if there was a buffer underrun, otherwise false.
+ */
+bool
Butler::get_audio (float* out, Frame frames)
{
- _audio.get (out, _audio_channels, frames);
+ bool const underrun = _audio.get (out, _audio_channels, frames);
_summon.notify_all ();
+ return underrun;
}
void
void seek (DCPTime position, bool accurate);
std::pair<boost::shared_ptr<PlayerVideo>, DCPTime> get_video ();
- void get_audio (float* out, Frame frames);
+ bool get_audio (float* out, Frame frames);
void disable_audio ();