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

Unified Diff: media/audio/audio_output.h

Issue 17401: Low level windows audio support (part 1 of 2)... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 11 months 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
« no previous file with comments | « no previous file | media/audio/win/audio_manager_win.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/audio/audio_output.h
===================================================================
--- media/audio/audio_output.h (revision 7712)
+++ media/audio/audio_output.h (working copy)
@@ -33,6 +33,7 @@
// Specifically for this case we avoid supporting complex formats such as MP3
// or WMA. Complex format decoding should be done by the renderers.
+
// Models an audio stream that gets rendered to the audio hardware output.
// Because we support more audio streams than physically available channels
// a given AudioOutputStream might or might not talk directly to hardware.
@@ -106,6 +107,13 @@
AUDIO_MOCK // Creates a dummy AudioOutputStream object.
};
+ // Telephone quality sample rate, mostly for speech-only audio.
+ static const int kTelephoneSampleRate = 8000;
+ // CD sampling rate is 44.1 KHz or conveniently 2x2x3x3x5x5x7x7.
+ static const int kAudioCDSampleRate = 44100;
+ // Digital Audio Tape sample rate.
+ static const int kAudioDATSampleRate = 48000;
+
// Factory for all the supported stream formats. At this moment |channels|
// can be 1 (mono) or 2 (stereo). The |sample_rate| is in hertz and can be
// any value supported by the underlying platform. For some future formats
@@ -123,13 +131,19 @@
virtual void MuteAll() = 0;
virtual void UnMuteAll() = 0;
+ // For testing purposes only. Returns the internal buffer of the last
+ // AUDIO_MOCK AudioOutputStream closed. Returns NULL if none closed yet.
+ // The buffer size is the same as passed to AudioOutputStream::Open().
+ virtual const void* GetLastMockBuffer() = 0;
+
+ // Get AudioManager singleton.
+ // TODO(cpu): Define threading requirements for interacting with AudioManager.
+ static AudioManager* GetAudioManager();
+
protected:
virtual ~AudioManager() {}
};
-// Get AudioManager singleton.
-// TODO(cpu): Define threading requirements for interacting with AudioManager.
-AudioManager* GetAudioManager();
#endif // MEDIA_AUDIO_AUDIO_OUTPUT_H_
« no previous file with comments | « no previous file | media/audio/win/audio_manager_win.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698