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

Unified Diff: media/audio/audio_manager_base.cc

Issue 12316131: Moved AudioUtil static functions to AudioManager interfaces (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: made the GetPreferredOutputStreamParameters protected Created 7 years, 10 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 | « media/audio/audio_manager_base.h ('k') | media/audio/audio_output_proxy_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/audio/audio_manager_base.cc
diff --git a/media/audio/audio_manager_base.cc b/media/audio/audio_manager_base.cc
index 662d39a9c43685adab5c40c082b0b62ad2e6c66a..2a65f8264ac63a5186cb688546a25204425e1ef9 100644
--- a/media/audio/audio_manager_base.cc
+++ b/media/audio/audio_manager_base.cc
@@ -182,7 +182,7 @@ AudioOutputStream* AudioManagerBase::MakeAudioOutputStreamProxy(
// as our input parameters.
AudioParameters output_params = params;
if (use_audio_output_resampler) {
- output_params = GetPreferredLowLatencyOutputStreamParameters(params);
+ output_params = GetPreferredOutputStreamParameters(params);
// Ensure we only pass on valid output parameters.
if (!output_params.IsValid()) {
@@ -317,22 +317,6 @@ void AudioManagerBase::ShutdownOnAudioThread() {
#endif // defined(OS_IOS)
}
-AudioParameters AudioManagerBase::GetPreferredLowLatencyOutputStreamParameters(
- const AudioParameters& input_params) {
-#if defined(OS_IOS)
- // IOS implements audio input only.
- NOTIMPLEMENTED();
- return AudioParameters();
-#else
- // TODO(dalecurtis): This should include bits per channel and channel layout
- // eventually.
- return AudioParameters(
- AudioParameters::AUDIO_PCM_LOW_LATENCY,
- input_params.channel_layout(), input_params.input_channels(),
- GetAudioHardwareSampleRate(), 16, GetAudioHardwareBufferSize());
-#endif // defined(OS_IOS)
-}
-
void AudioManagerBase::AddOutputDeviceChangeListener(
AudioDeviceListener* listener) {
DCHECK(message_loop_->BelongsToCurrentThread());
@@ -351,4 +335,14 @@ void AudioManagerBase::NotifyAllOutputDeviceChangeListeners() {
FOR_EACH_OBSERVER(AudioDeviceListener, output_listeners_, OnDeviceChange());
}
+AudioParameters AudioManagerBase::GetDefaultOutputStreamParameters() {
+ return GetPreferredOutputStreamParameters(AudioParameters());
+}
+
+AudioParameters AudioManagerBase::GetInputStreamParameters(
+ const std::string& device_id) {
+ NOTREACHED();
+ return AudioParameters();
+}
+
} // namespace media
« no previous file with comments | « media/audio/audio_manager_base.h ('k') | media/audio/audio_output_proxy_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698