diff options
| author | Carl Hetherington <cth@carlh.net> | 2017-07-12 23:20:22 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2017-07-12 23:20:22 +0100 |
| commit | 71ab83292da50b080befd98b01804a120b94f65e (patch) | |
| tree | fd55691ab20b1528b23f9b4469f5d7f6cf2bad6c /src/lib/butler.cc | |
| parent | faa471f2399241277e1220c9330cd4cd4cf27f26 (diff) | |
Report underruns from Butler::get_audio.
Diffstat (limited to 'src/lib/butler.cc')
| -rw-r--r-- | src/lib/butler.cc | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/lib/butler.cc b/src/lib/butler.cc index 54c1acc4d..771c4e633 100644 --- a/src/lib/butler.cc +++ b/src/lib/butler.cc @@ -226,11 +226,16 @@ Butler::player_changed () } } -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 |
