Chromium Code Reviews| Index: media/audio/audio_manager.h |
| diff --git a/media/audio/audio_manager.h b/media/audio/audio_manager.h |
| index 805db89e43d3a31d14ffc0014cd556abc67646d6..d67ca3481087b5ef10d2d0464d1f46a4afe81825 100644 |
| --- a/media/audio/audio_manager.h |
| +++ b/media/audio/audio_manager.h |
| @@ -12,6 +12,9 @@ class AudioInputStream; |
| class AudioOutputStream; |
| class MessageLoop; |
| +// TODO(sergeyu): In this interface and some other places AudioParameters struct |
| +// is passed by value. It is better to change it to const reference. |
| + |
| // Manages all audio resources. In particular it owns the AudioOutputStream |
| // objects. Provides some convenience functions that avoid the need to provide |
| // iterators over the existing streams. |
| @@ -26,14 +29,19 @@ class AudioManager { |
| // sample rates. |
| virtual bool HasAudioInputDevices() = 0; |
| - // Factory for all the supported stream formats. The |channels| can be 1 to 5. |
| - // The |sample_rate| is in hertz and can be any value supported by the |
| - // platform. For some future formats the |sample_rate| and |bits_per_sample| |
| - // can take special values. |
| + // Factory for all the supported stream formats. |params| defines parameters |
| + // of the audio stream to be created. |
| + // |
| + // |params.sample_per_packet| is the requested buffer allocation which |
| + // the audio source thinks it can usually fill without blocking. Internally |
| + // two or three buffers are created, one will be locked for playback and one |
| + // will be ready to be filled in the call to AudioSourceCallback::OnMoreData(). |
|
scherkus (not reviewing)
2010/11/11 01:25:32
nit: >80 chars
Sergey Ulanov
2010/11/11 03:06:24
Done.
|
| + // |
| // Returns NULL if the combination of the parameters is not supported, or if |
| // we have reached some other platform specific limit. |
| // |
| - // AUDIO_PCM_LOW_LATENCY can be passed to this method and it has two effects: |
| + // |params.format| can be set to AUDIO_PCM_LOW_LATENCY and that has two |
| + // effects: |
| // 1- Instead of triple buffered the audio will be double buffered. |
| // 2- A low latency driver or alternative audio subsystem will be used when |
| // available. |
| @@ -53,8 +61,7 @@ class AudioManager { |
| // |
| // Do not free the returned AudioInputStream. It is owned by AudioManager. |
| // When you are done with it, call |Stop()| and |Close()| to release it. |
| - virtual AudioInputStream* MakeAudioInputStream(AudioParameters params, |
| - int samples_per_packet) = 0; |
| + virtual AudioInputStream* MakeAudioInputStream(AudioParameters params) = 0; |
| // Muting continues playback but effectively the volume is set to zero. |
| // Un-muting returns the volume to the previous level. |