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

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

Issue 9655018: Make AudioParameters a class instead of a struct (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix copyright years Created 8 years, 9 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/linux/audio_manager_linux.cc ('k') | media/audio/mac/audio_low_latency_input_mac.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/audio/mac/audio_input_mac.cc
diff --git a/media/audio/mac/audio_input_mac.cc b/media/audio/mac/audio_input_mac.cc
index e886ddf9698d899363b33a4e3629094c3126f9c0..61ab281dadb22a18899607bd1cea9f4c0db9af1d 100644
--- a/media/audio/mac/audio_input_mac.cc
+++ b/media/audio/mac/audio_input_mac.cc
@@ -30,18 +30,18 @@ PCMQueueInAudioInputStream::PCMQueueInAudioInputStream(
// A frame is one sample across all channels. In interleaved audio the per
// frame fields identify the set of n |channels|. In uncompressed audio, a
// packet is always one frame.
- format_.mSampleRate = params.sample_rate;
+ format_.mSampleRate = params.sample_rate();
format_.mFormatID = kAudioFormatLinearPCM;
format_.mFormatFlags = kLinearPCMFormatFlagIsPacked |
kLinearPCMFormatFlagIsSignedInteger;
- format_.mBitsPerChannel = params.bits_per_sample;
- format_.mChannelsPerFrame = params.channels;
+ format_.mBitsPerChannel = params.bits_per_sample();
+ format_.mChannelsPerFrame = params.channels();
format_.mFramesPerPacket = 1;
- format_.mBytesPerPacket = (params.bits_per_sample * params.channels) / 8;
+ format_.mBytesPerPacket = (params.bits_per_sample() * params.channels()) / 8;
format_.mBytesPerFrame = format_.mBytesPerPacket;
format_.mReserved = 0;
- buffer_size_bytes_ = params.GetPacketSize();
+ buffer_size_bytes_ = params.GetBytesPerBuffer();
}
PCMQueueInAudioInputStream::~PCMQueueInAudioInputStream() {
« no previous file with comments | « media/audio/linux/audio_manager_linux.cc ('k') | media/audio/mac/audio_low_latency_input_mac.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698