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

Unified Diff: media/audio/win/waveout_output_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/wavein_input_win.cc ('k') | media/base/audio_renderer_sink.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/audio/win/waveout_output_win.cc
diff --git a/media/audio/win/waveout_output_win.cc b/media/audio/win/waveout_output_win.cc
index 35fd63af72a35defcdb63ac84c90c195032d1009..c8c7523f0a5d0de0093328f3a9d914e8473bd1b7 100644
--- a/media/audio/win/waveout_output_win.cc
+++ b/media/audio/win/waveout_output_win.cc
@@ -84,27 +84,27 @@ PCMWaveOutAudioOutputStream::PCMWaveOutAudioOutputStream(
waveout_(NULL),
callback_(NULL),
num_buffers_(num_buffers),
- buffer_size_(params.GetPacketSize()),
+ buffer_size_(params.GetBytesPerBuffer()),
volume_(1),
- channels_(params.channels),
+ channels_(params.channels()),
pending_bytes_(0) {
format_.Format.wFormatTag = WAVE_FORMAT_EXTENSIBLE;
- format_.Format.nChannels = params.channels;
- format_.Format.nSamplesPerSec = params.sample_rate;
- format_.Format.wBitsPerSample = params.bits_per_sample;
+ format_.Format.nChannels = params.channels();
+ format_.Format.nSamplesPerSec = params.sample_rate();
+ format_.Format.wBitsPerSample = params.bits_per_sample();
format_.Format.cbSize = sizeof(format_) - sizeof(WAVEFORMATEX);
// The next are computed from above.
format_.Format.nBlockAlign = (format_.Format.nChannels *
format_.Format.wBitsPerSample) / 8;
format_.Format.nAvgBytesPerSec = format_.Format.nBlockAlign *
format_.Format.nSamplesPerSec;
- if (params.channels > kMaxChannelsToMask) {
+ if (params.channels() > kMaxChannelsToMask) {
format_.dwChannelMask = kChannelsToMask[kMaxChannelsToMask];
} else {
- format_.dwChannelMask = kChannelsToMask[params.channels];
+ format_.dwChannelMask = kChannelsToMask[params.channels()];
}
format_.SubFormat = KSDATAFORMAT_SUBTYPE_PCM;
- format_.Samples.wValidBitsPerSample = params.bits_per_sample;
+ format_.Samples.wValidBitsPerSample = params.bits_per_sample();
}
PCMWaveOutAudioOutputStream::~PCMWaveOutAudioOutputStream() {
« no previous file with comments | « media/audio/win/wavein_input_win.cc ('k') | media/base/audio_renderer_sink.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698