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

Unified Diff: media/audio/mac/audio_manager_mac.cc

Issue 11028092: Revert 159666 - Use clients' preferred buffer size when the sample rates match and it is a number s… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 2 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/mac/audio_manager_mac.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/audio/mac/audio_manager_mac.cc
===================================================================
--- media/audio/mac/audio_manager_mac.cc (revision 160819)
+++ media/audio/mac/audio_manager_mac.cc (working copy)
@@ -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 @@
// 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 @@
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
« no previous file with comments | « media/audio/mac/audio_manager_mac.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698