Chromium Code Reviews| Index: media/audio/ios/audio_manager_ios.mm |
| diff --git a/media/audio/ios/audio_manager_ios.mm b/media/audio/ios/audio_manager_ios.mm |
| index 8949b1c711bcdfb9377d069e5c492a0c8b0876cb..1c1b0cf2c93746a57d80ea2185e0c72bc0565bbf 100644 |
| --- a/media/audio/ios/audio_manager_ios.mm |
| +++ b/media/audio/ios/audio_manager_ios.mm |
| @@ -8,9 +8,11 @@ |
| #import <AVFoundation/AVFoundation.h> |
| #include "base/sys_info.h" |
| +#include "media/audio/audio_parameters.h" |
| #include "media/audio/fake_audio_input_stream.h" |
| #include "media/audio/ios/audio_session_util_ios.h" |
| #include "media/audio/mac/audio_input_mac.h" |
| +#include "media/base/channel_layout.h" |
| #include "media/base/limits.h" |
| namespace media { |
| @@ -47,6 +49,30 @@ bool AudioManagerIOS::HasAudioInputDevices() { |
| return error == kAudioSessionNoError ? audio_input_is_available : false; |
| } |
| +AudioParameters AudioManagerIOS::GetDefaultOutputStreamParameters( |
|
DaleCurtis
2013/03/02 01:53:56
Shouldn't these just be NOTREACHED() right now?
no longer working on chromium
2013/03/04 14:55:04
I am not sure here. audio_util.cc methods cover th
|
| + const AudioParameters& input_params) { |
| + // TODO(xians): handle the case when input_params is valid. |
| + // TODO(xians): figure out the right output sample rate and sample rate to |
| + // achieve the best audio performance for iOS devices. |
| + static const int kDefaultSampleRate = 48000; |
| + static const int kDefaultBufferSize = 2048 |
| + return AudioParameters( |
| + AudioParameters::AUDIO_PCM_LOW_LATENCY, CHANNEL_LAYOUT_STEREO, |
| + kDefaultSampleRate, 16, kDefaultBufferSize); |
| +} |
| + |
| +AudioParameters AudioManagerIOS::GetInputStreamParameters( |
| + const std::string& device_id) { |
| + // TODO(xians): figure out the right input sample rate and buffer size to |
| + // achieve the best audio performance for iOS devices. |
| + // TODO(xians): query the native channel layout for the specific device. |
| + static const int kDefaultSampleRate = 48000; |
| + static const int kDefaultBufferSize = 2048 |
| + return AudioParameters( |
| + AudioParameters::AUDIO_PCM_LOW_LATENCY, CHANNEL_LAYOUT_STEREO, |
| + kDefaultSampleRate, 16, kDefaultBufferSize); |
| +} |
| + |
| AudioOutputStream* AudioManagerIOS::MakeAudioOutputStream( |
| const AudioParameters& params) { |
| NOTIMPLEMENTED(); // Only input is supported on iOS. |