| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef MEDIA_AUDIO_AUDIO_OUTPUT_CONTROLLER_H_ | 5 #ifndef MEDIA_AUDIO_AUDIO_OUTPUT_CONTROLLER_H_ |
| 6 #define MEDIA_AUDIO_AUDIO_OUTPUT_CONTROLLER_H_ | 6 #define MEDIA_AUDIO_AUDIO_OUTPUT_CONTROLLER_H_ |
| 7 | 7 |
| 8 #include "base/memory/ref_counted.h" | 8 #include "base/memory/ref_counted.h" |
| 9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
| 10 #include "base/synchronization/lock.h" | 10 #include "base/synchronization/lock.h" |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 42 // Regular latency mode: | 42 // Regular latency mode: |
| 43 // In this mode we receive signals from AudioOutputController and then we | 43 // In this mode we receive signals from AudioOutputController and then we |
| 44 // enqueue data into it. | 44 // enqueue data into it. |
| 45 // | 45 // |
| 46 // Low latency mode: | 46 // Low latency mode: |
| 47 // In this mode a DataSource object is given to the AudioOutputController | 47 // In this mode a DataSource object is given to the AudioOutputController |
| 48 // and AudioOutputController reads from it synchronously. | 48 // and AudioOutputController reads from it synchronously. |
| 49 // | 49 // |
| 50 namespace media { | 50 namespace media { |
| 51 | 51 |
| 52 class MEDIA_EXPORT AudioOutputController | 52 class AudioOutputController |
| 53 : public base::RefCountedThreadSafe<AudioOutputController>, | 53 : public base::RefCountedThreadSafe<AudioOutputController>, |
| 54 public AudioOutputStream::AudioSourceCallback { | 54 public AudioOutputStream::AudioSourceCallback { |
| 55 public: | 55 public: |
| 56 // Internal state of the source. | 56 // Internal state of the source. |
| 57 enum State { | 57 enum State { |
| 58 kEmpty, | 58 kEmpty, |
| 59 kCreated, | 59 kCreated, |
| 60 kPlaying, | 60 kPlaying, |
| 61 kPaused, | 61 kPaused, |
| 62 kClosed, | 62 kClosed, |
| (...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 202 | 202 |
| 203 // The message loop of audio thread that this object runs on. | 203 // The message loop of audio thread that this object runs on. |
| 204 MessageLoop* message_loop_; | 204 MessageLoop* message_loop_; |
| 205 | 205 |
| 206 DISALLOW_COPY_AND_ASSIGN(AudioOutputController); | 206 DISALLOW_COPY_AND_ASSIGN(AudioOutputController); |
| 207 }; | 207 }; |
| 208 | 208 |
| 209 } // namespace media | 209 } // namespace media |
| 210 | 210 |
| 211 #endif // MEDIA_AUDIO_AUDIO_OUTPUT_CONTROLLER_H_ | 211 #endif // MEDIA_AUDIO_AUDIO_OUTPUT_CONTROLLER_H_ |
| OLD | NEW |