diff options
Diffstat (limited to 'media/audio/audio_io.h')
-rw-r--r-- | media/audio/audio_io.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/media/audio/audio_io.h b/media/audio/audio_io.h index 3069eaa..173f4f5 100644 --- a/media/audio/audio_io.h +++ b/media/audio/audio_io.h @@ -72,6 +72,16 @@ class MEDIA_EXPORT AudioOutputStream { // playback will not continue. |code| is an error code that is platform // specific. virtual void OnError(AudioOutputStream* stream, int code) = 0; + + // Waits till data becomes available. Used when buffering data starting + // new audio stream. + // Polling is not the best approach, but incorporating messaging loop + // with delayed tasks into guts of complex code is even worse, as it is + // very error-prone. We cannot easily add synchronization, interface is + // already cut in stone because of need of backward compatibility with + // plugins. In any case, data is usually immediately available, + // so there would be no delay. + virtual void WaitTillDataReady() {} }; virtual ~AudioOutputStream() {} |