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

Unified Diff: media/audio/win/wavein_input_win.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/win/audio_manager_win.cc ('k') | media/audio/win/waveout_output_win.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/audio/win/wavein_input_win.cc
diff --git a/media/audio/win/wavein_input_win.cc b/media/audio/win/wavein_input_win.cc
index cd9febc6322baf7df39c15ee7907e46b85303b3c..f8a4e7ded95e184b53eda5b64dae63ff8ce979b7 100644
--- a/media/audio/win/wavein_input_win.cc
+++ b/media/audio/win/wavein_input_win.cc
@@ -36,15 +36,15 @@ PCMWaveInAudioInputStream::PCMWaveInAudioInputStream(
callback_(NULL),
num_buffers_(num_buffers),
buffer_(NULL),
- channels_(params.channels) {
+ channels_(params.channels()) {
format_.wFormatTag = WAVE_FORMAT_PCM;
- format_.nChannels = params.channels > 2 ? 2 : params.channels;
- format_.nSamplesPerSec = params.sample_rate;
- format_.wBitsPerSample = params.bits_per_sample;
+ format_.nChannels = params.channels() > 2 ? 2 : params.channels();
+ format_.nSamplesPerSec = params.sample_rate();
+ format_.wBitsPerSample = params.bits_per_sample();
format_.cbSize = 0;
format_.nBlockAlign = (format_.nChannels * format_.wBitsPerSample) / 8;
format_.nAvgBytesPerSec = format_.nBlockAlign * format_.nSamplesPerSec;
- buffer_size_ = params.samples_per_packet * format_.nBlockAlign;
+ buffer_size_ = params.frames_per_buffer() * format_.nBlockAlign;
// If we don't have a packet size we use 100ms.
if (!buffer_size_)
buffer_size_ = format_.nAvgBytesPerSec / 10;
« no previous file with comments | « media/audio/win/audio_manager_win.cc ('k') | media/audio/win/waveout_output_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698