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

Side by Side Diff: media/audio/win/waveout_output_win.cc

Issue 12611030: Remove unused parameter to OnError() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix nits + rebase Created 7 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 unified diff | Download patch
« no previous file with comments | « media/audio/win/wavein_input_win.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "media/audio/win/waveout_output_win.h" 5 #include "media/audio/win/waveout_output_win.h"
6 6
7 #include <windows.h> 7 #include <windows.h>
8 #include <mmsystem.h> 8 #include <mmsystem.h>
9 #pragma comment(lib, "winmm.lib") 9 #pragma comment(lib, "winmm.lib")
10 10
(...skipping 317 matching lines...) Expand 10 before | Expand all | Expand 10 after
328 328
329 void PCMWaveOutAudioOutputStream::GetVolume(double* volume) { 329 void PCMWaveOutAudioOutputStream::GetVolume(double* volume) {
330 if (!waveout_) 330 if (!waveout_)
331 return; 331 return;
332 *volume = volume_; 332 *volume = volume_;
333 } 333 }
334 334
335 void PCMWaveOutAudioOutputStream::HandleError(MMRESULT error) { 335 void PCMWaveOutAudioOutputStream::HandleError(MMRESULT error) {
336 DLOG(WARNING) << "PCMWaveOutAudio error " << error; 336 DLOG(WARNING) << "PCMWaveOutAudio error " << error;
337 if (callback_) 337 if (callback_)
338 callback_->OnError(this, error); 338 callback_->OnError(this);
339 } 339 }
340 340
341 void PCMWaveOutAudioOutputStream::QueueNextPacket(WAVEHDR *buffer) { 341 void PCMWaveOutAudioOutputStream::QueueNextPacket(WAVEHDR *buffer) {
342 DCHECK_EQ(channels_, format_.Format.nChannels); 342 DCHECK_EQ(channels_, format_.Format.nChannels);
343 // Call the source which will fill our buffer with pleasant sounds and 343 // Call the source which will fill our buffer with pleasant sounds and
344 // return to us how many bytes were used. 344 // return to us how many bytes were used.
345 // TODO(fbarchard): Handle used 0 by queueing more. 345 // TODO(fbarchard): Handle used 0 by queueing more.
346 346
347 // HACK: Yield if Read() is called too often. On older platforms which are 347 // HACK: Yield if Read() is called too often. On older platforms which are
348 // still using the WaveOut backend, we run into synchronization issues where 348 // still using the WaveOut backend, we run into synchronization issues where
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
416 buffer, 416 buffer,
417 sizeof(WAVEHDR)); 417 sizeof(WAVEHDR));
418 if (result != MMSYSERR_NOERROR) 418 if (result != MMSYSERR_NOERROR)
419 stream->HandleError(result); 419 stream->HandleError(result);
420 stream->pending_bytes_ += buffer->dwBufferLength; 420 stream->pending_bytes_ += buffer->dwBufferLength;
421 } 421 }
422 } 422 }
423 } 423 }
424 424
425 } // namespace media 425 } // namespace media
OLDNEW
« no previous file with comments | « media/audio/win/wavein_input_win.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698