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

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

Issue 290003002: Remove OnMoreIOData() (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: fixed the media unittests on mac. Created 6 years, 7 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/audio_low_latency_output_win_unittest.cc ('k') | media/cast/test/receiver.cc » ('j') | 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 <windows.h> 5 #include <windows.h>
6 #include <mmsystem.h> 6 #include <mmsystem.h>
7 7
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "base/base_paths.h" 9 #include "base/base_paths.h"
10 #include "base/memory/aligned_memory.h" 10 #include "base/memory/aligned_memory.h"
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 had_error_(0) { 51 had_error_(0) {
52 } 52 }
53 // AudioSourceCallback::OnMoreData implementation: 53 // AudioSourceCallback::OnMoreData implementation:
54 virtual int OnMoreData(AudioBus* audio_bus, 54 virtual int OnMoreData(AudioBus* audio_bus,
55 AudioBuffersState buffers_state) { 55 AudioBuffersState buffers_state) {
56 ++callback_count_; 56 ++callback_count_;
57 // Touch the channel memory value to make sure memory is good. 57 // Touch the channel memory value to make sure memory is good.
58 audio_bus->Zero(); 58 audio_bus->Zero();
59 return audio_bus->frames(); 59 return audio_bus->frames();
60 } 60 }
61 virtual int OnMoreIOData(AudioBus* source,
62 AudioBus* dest,
63 AudioBuffersState buffers_state) {
64 NOTREACHED();
65 return 0;
66 }
67 // AudioSourceCallback::OnError implementation: 61 // AudioSourceCallback::OnError implementation:
68 virtual void OnError(AudioOutputStream* stream) { 62 virtual void OnError(AudioOutputStream* stream) {
69 ++had_error_; 63 ++had_error_;
70 } 64 }
71 // Returns how many times OnMoreData() has been called. 65 // Returns how many times OnMoreData() has been called.
72 int callback_count() const { 66 int callback_count() const {
73 return callback_count_; 67 return callback_count_;
74 } 68 }
75 // Returns how many times the OnError callback was called. 69 // Returns how many times the OnError callback was called.
76 int had_error() const { 70 int had_error() const {
(...skipping 611 matching lines...) Expand 10 before | Expand all | Expand 10 after
688 oas->Start(&source); 682 oas->Start(&source);
689 683
690 ::WaitForSingleObject(thread, INFINITE); 684 ::WaitForSingleObject(thread, INFINITE);
691 ::CloseHandle(thread); 685 ::CloseHandle(thread);
692 686
693 oas->Stop(); 687 oas->Stop();
694 oas->Close(); 688 oas->Close();
695 } 689 }
696 690
697 } // namespace media 691 } // namespace media
OLDNEW
« no previous file with comments | « media/audio/win/audio_low_latency_output_win_unittest.cc ('k') | media/cast/test/receiver.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698