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

Unified Diff: media/audio/mac/audio_low_latency_output_mac.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/mac/audio_low_latency_input_mac.cc ('k') | media/audio/mac/audio_manager_mac.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/audio/mac/audio_low_latency_output_mac.cc
diff --git a/media/audio/mac/audio_low_latency_output_mac.cc b/media/audio/mac/audio_low_latency_output_mac.cc
index 6ab0ead56d7b467dc0c7e50cabbb942788a2483c..4b82befc7850dcb4aa08553de5e96306ff922b67 100644
--- a/media/audio/mac/audio_low_latency_output_mac.cc
+++ b/media/audio/mac/audio_low_latency_output_mac.cc
@@ -81,7 +81,10 @@ AUAudioOutputStream::AUAudioOutputStream(
// Calculate the number of sample frames per callback.
number_of_frames_ = params.GetBytesPerBuffer() / format_.mBytesPerPacket;
DVLOG(1) << "Number of frames per callback: " << number_of_frames_;
- CHECK_EQ(number_of_frames_, GetAudioHardwareBufferSize());
+ const AudioParameters parameters =
+ manager_->GetDefaultOutputStreamParameters();
+ CHECK_EQ(number_of_frames_,
+ static_cast<size_t>(parameters.frames_per_buffer()));
}
AUAudioOutputStream::~AUAudioOutputStream() {
@@ -167,7 +170,8 @@ bool AUAudioOutputStream::Configure() {
// Set the buffer frame size.
// WARNING: Setting this value changes the frame size for all audio units in
// the current process. It's imperative that the input and output frame sizes
- // be the same as audio_util::GetAudioHardwareBufferSize().
+ // be the same as the frames_per_buffer() returned by
+ // GetDefaultOutputStreamParameters.
// See http://crbug.com/154352 for details.
UInt32 buffer_size = number_of_frames_;
result = AudioUnitSetProperty(
« no previous file with comments | « media/audio/mac/audio_low_latency_input_mac.cc ('k') | media/audio/mac/audio_manager_mac.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698