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

Side by Side Diff: media/audio/win/audio_low_latency_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
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/audio_low_latency_output_win.h" 5 #include "media/audio/win/audio_low_latency_output_win.h"
6 6
7 #include <Functiondiscoverykeys_devpkey.h> 7 #include <Functiondiscoverykeys_devpkey.h>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/debug/trace_event.h" 10 #include "base/debug/trace_event.h"
(...skipping 588 matching lines...) Expand 10 before | Expand all | Expand 10 after
599 599
600 num_written_frames_ += packet_size_frames_; 600 num_written_frames_ += packet_size_frames_;
601 } 601 }
602 } 602 }
603 603
604 void WASAPIAudioOutputStream::HandleError(HRESULT err) { 604 void WASAPIAudioOutputStream::HandleError(HRESULT err) {
605 CHECK((started() && GetCurrentThreadId() == render_thread_->tid()) || 605 CHECK((started() && GetCurrentThreadId() == render_thread_->tid()) ||
606 (!started() && GetCurrentThreadId() == creating_thread_id_)); 606 (!started() && GetCurrentThreadId() == creating_thread_id_));
607 NOTREACHED() << "Error code: " << std::hex << err; 607 NOTREACHED() << "Error code: " << std::hex << err;
608 if (source_) 608 if (source_)
609 source_->OnError(this, static_cast<int>(err)); 609 source_->OnError(this);
610 } 610 }
611 611
612 HRESULT WASAPIAudioOutputStream::ExclusiveModeInitialization( 612 HRESULT WASAPIAudioOutputStream::ExclusiveModeInitialization(
613 IAudioClient* client, HANDLE event_handle, uint32* endpoint_buffer_size) { 613 IAudioClient* client, HANDLE event_handle, uint32* endpoint_buffer_size) {
614 DCHECK_EQ(share_mode_, AUDCLNT_SHAREMODE_EXCLUSIVE); 614 DCHECK_EQ(share_mode_, AUDCLNT_SHAREMODE_EXCLUSIVE);
615 615
616 float f = (1000.0 * packet_size_frames_) / format_.Format.nSamplesPerSec; 616 float f = (1000.0 * packet_size_frames_) / format_.Format.nSamplesPerSec;
617 REFERENCE_TIME requested_buffer_duration = 617 REFERENCE_TIME requested_buffer_duration =
618 static_cast<REFERENCE_TIME>(f * 10000.0 + 0.5); 618 static_cast<REFERENCE_TIME>(f * 10000.0 + 0.5);
619 619
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
682 VLOG(1) << "IAudioClient::GetBufferSize: " << std::hex << hr; 682 VLOG(1) << "IAudioClient::GetBufferSize: " << std::hex << hr;
683 return hr; 683 return hr;
684 } 684 }
685 685
686 *endpoint_buffer_size = buffer_size_in_frames; 686 *endpoint_buffer_size = buffer_size_in_frames;
687 VLOG(2) << "endpoint buffer size: " << buffer_size_in_frames; 687 VLOG(2) << "endpoint buffer size: " << buffer_size_in_frames;
688 return hr; 688 return hr;
689 } 689 }
690 690
691 } // namespace media 691 } // namespace media
OLDNEW
« no previous file with comments | « media/audio/win/audio_low_latency_input_win_unittest.cc ('k') | media/audio/win/audio_low_latency_output_win_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698