Index: media/audio/audio_device_thread.h |
diff --git a/media/audio/audio_device_thread.h b/media/audio/audio_device_thread.h |
index 1f63c21d9f96329e71b4d79d92622934464b16ee..e687822680395b885e85ccbc366b16e430030aeb 100644 |
--- a/media/audio/audio_device_thread.h |
+++ b/media/audio/audio_device_thread.h |
@@ -50,8 +50,13 @@ class MEDIA_EXPORT AudioDeviceThread { |
// before Process can be called. |
virtual void MapSharedMemory() = 0; |
- // Called whenever we receive notifications about pending data. |
- virtual void Process(uint32 pending_data) = 0; |
+ // Called whenever we receive notifications about pending input data. |
+ virtual void Process(uint32_t pending_data) = 0; |
+ |
+ // Called before ProcessInput() if the consumer has skipped any frames. The |
+ // source can handle this appropriately depending on its type. An ordinary |
+ // file playout would ignore this. Only used for output. |
+ virtual void FramesSkipped(uint32_t frames_skipped) = 0; |
protected: |
// Protected so that derived classes can access directly. |
@@ -75,11 +80,17 @@ class MEDIA_EXPORT AudioDeviceThread { |
// Starts the audio thread. The thread must not already be running. If |
// |sychronized_buffers| is set, the browser expects to be notified via the |
- // |socket| every time AudioDeviceThread::Process() completes. |
+ // |socket| every time AudioDeviceThread::Process() completes. |input| should |
+ // be true for input and false for output. It is used for reading the right |
+ // amount of data from the socket. |
+ // TODO(grunell): |input| is ugly, but there is plans to re-use a thread for |
tommi (sloooow) - chröme
2015/12/01 13:34:25
s/is plans/are plans
Henrik Grunell
2015/12/03 17:01:06
Done.
|
+ // multiple inputs/outputs (see todo comment above) so we do it this way |
+ // meanwhile instead of using separating classes. |
tommi (sloooow) - chröme
2015/12/01 13:34:25
using separate classes
Henrik Grunell
2015/12/03 17:01:06
Done.
|
void Start(AudioDeviceThread::Callback* callback, |
base::SyncSocket::Handle socket, |
const char* thread_name, |
- bool synchronized_buffers); |
+ bool synchronized_buffers, |
+ bool input); |
// This tells the audio thread to stop and clean up the data. |
// The method can stop the thread synchronously or asynchronously. |