Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(548)

Unified Diff: media/audio/audio_manager.h

Issue 4661001: Simplified AudioOutputStream interface. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: - Created 10 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: media/audio/audio_manager.h
diff --git a/media/audio/audio_manager.h b/media/audio/audio_manager.h
index 805db89e43d3a31d14ffc0014cd556abc67646d6..6fc8e12e8d015fcb66ca5958e741001cd8bcc636 100644
--- a/media/audio/audio_manager.h
+++ b/media/audio/audio_manager.h
@@ -26,14 +26,20 @@ 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.
+ //
+ // |packet_size| is the requested buffer allocation which
+ // the audio source thinks it can usually fill without blocking. Internally
+ // two or three buffers of |packet_size| size are created, one will be
+ // locked for playback and one will be ready to be filled in the call to
+ // AudioSourceCallback::OnMoreData().
+ //
// 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 +59,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.

Powered by Google App Engine
This is Rietveld 408576698