diff options
author | xians@chromium.org <xians@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-10-09 11:28:42 +0000 |
---|---|---|
committer | xians@chromium.org <xians@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-10-09 11:28:42 +0000 |
commit | b8d7faf4257fc3ffc8d3abb043ef4728033e3742 (patch) | |
tree | 834124cfc48b34e1dba3f11213ec60bd48553312 /media | |
parent | fcd63418dea0576332cb4ba43a85c36cc4d911cc (diff) | |
download | chromium_src-b8d7faf4257fc3ffc8d3abb043ef4728033e3742.zip chromium_src-b8d7faf4257fc3ffc8d3abb043ef4728033e3742.tar.gz chromium_src-b8d7faf4257fc3ffc8d3abb043ef4728033e3742.tar.bz2 |
Revert 159666 - Use clients' preferred buffer size when the sample rates match and it is a number smaller than 2047.
To be in par with M23.
BUG=152780
TEST=apprtc.appspot.com/?debug=loopback, no choppy audio
Review URL: https://chromiumcodereview.appspot.com/11014015
TBR=xians@chromium.org
Review URL: https://codereview.chromium.org/11028092
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@160820 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'media')
-rw-r--r-- | media/audio/mac/audio_manager_mac.cc | 22 | ||||
-rw-r--r-- | media/audio/mac/audio_manager_mac.h | 2 |
2 files changed, 0 insertions, 24 deletions
diff --git a/media/audio/mac/audio_manager_mac.cc b/media/audio/mac/audio_manager_mac.cc index a4cadba..edf59930 100644 --- a/media/audio/mac/audio_manager_mac.cc +++ b/media/audio/mac/audio_manager_mac.cc @@ -10,7 +10,6 @@ #include "base/mac/mac_logging.h" #include "base/mac/scoped_cftyperef.h" #include "base/sys_string_conversions.h" -#include "media/audio/audio_util.h" #include "media/audio/mac/audio_input_mac.h" #include "media/audio/mac/audio_low_latency_input_mac.h" #include "media/audio/mac/audio_low_latency_output_mac.h" @@ -26,9 +25,6 @@ namespace media { // Maximum number of output streams that can be open simultaneously. static const int kMaxOutputStreams = 50; -// Maximum buffer size that CoreAudio can support, used by low latency path. -static const int kMaxLowLatencyBufferSize = 2047; - static bool HasAudioHardware(AudioObjectPropertySelector selector) { AudioDeviceID output_device_id = kAudioObjectUnknown; const AudioObjectPropertyAddress property_address = { @@ -337,22 +333,4 @@ AudioManager* CreateAudioManager() { return new AudioManagerMac(); } -AudioParameters AudioManagerMac::GetPreferredLowLatencyOutputStreamParameters( - const AudioParameters& params) { - // Applications should use their own preferred buffer size when no resampler - // is needed, and Apple CoreAudio can accept any buffer size up to 2047. - int native_sample_rate = GetAudioHardwareSampleRate(); - int buffer_size = GetAudioHardwareBufferSize(); - if (native_sample_rate == params.sample_rate() && - params.frames_per_buffer() <= kMaxLowLatencyBufferSize) { - buffer_size = params.frames_per_buffer(); - } - - return AudioParameters(AudioParameters::AUDIO_PCM_LOW_LATENCY, - params.channel_layout(), - native_sample_rate, - 16, - buffer_size); -} - } // namespace media diff --git a/media/audio/mac/audio_manager_mac.h b/media/audio/mac/audio_manager_mac.h index 73d5e04..d655d4b 100644 --- a/media/audio/mac/audio_manager_mac.h +++ b/media/audio/mac/audio_manager_mac.h @@ -33,8 +33,6 @@ class MEDIA_EXPORT AudioManagerMac : public AudioManagerBase { const AudioParameters& params, const std::string& device_id) OVERRIDE; virtual AudioInputStream* MakeLowLatencyInputStream( const AudioParameters& params, const std::string& device_id) OVERRIDE; - virtual AudioParameters GetPreferredLowLatencyOutputStreamParameters( - const AudioParameters& params) OVERRIDE; protected: virtual ~AudioManagerMac(); |