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

Unified Diff: media/audio/win/audio_output_win_unittest.cc

Issue 10184011: Remove unused parameter "stream" from all variants of OnMoreData(). (Closed) Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: Created 8 years, 8 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_low_latency_output_win_unittest.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/audio_output_win_unittest.cc
===================================================================
--- media/audio/win/audio_output_win_unittest.cc (revision 133451)
+++ media/audio/win/audio_output_win_unittest.cc (working copy)
@@ -45,8 +45,9 @@
had_error_(0) {
}
// AudioSourceCallback::OnMoreData implementation:
- virtual uint32 OnMoreData(AudioOutputStream* stream, uint8* dest,
- uint32 max_size, AudioBuffersState buffers_state) {
+ virtual uint32 OnMoreData(uint8* dest,
+ uint32 max_size,
+ AudioBuffersState buffers_state) {
++callback_count_;
// Touch the first byte to make sure memory is good.
if (max_size)
@@ -86,11 +87,11 @@
buffer_address_[2] = NULL;
}
// Override of TestSourceBasic::OnMoreData.
- virtual uint32 OnMoreData(AudioOutputStream* stream,
- uint8* dest, uint32 max_size,
+ virtual uint32 OnMoreData(uint8* dest,
+ uint32 max_size,
AudioBuffersState buffers_state) {
// Call the base, which increments the callback_count_.
- TestSourceBasic::OnMoreData(stream, dest, max_size, buffers_state);
+ TestSourceBasic::OnMoreData(dest, max_size, buffers_state);
if (callback_count() % kNumBuffers == 2) {
set_error(!CompareExistingIfNotNULL(2, dest));
} else if (callback_count() % kNumBuffers == 1) {
@@ -123,11 +124,11 @@
TestSourceLaggy(int laggy_after_buffer, int lag_in_ms)
: laggy_after_buffer_(laggy_after_buffer), lag_in_ms_(lag_in_ms) {
}
- virtual uint32 OnMoreData(AudioOutputStream* stream,
- uint8* dest, uint32 max_size,
+ virtual uint32 OnMoreData(uint8* dest,
+ uint32 max_size,
AudioBuffersState buffers_state) {
// Call the base, which increments the callback_count_.
- TestSourceBasic::OnMoreData(stream, dest, max_size, buffers_state);
+ TestSourceBasic::OnMoreData(dest, max_size, buffers_state);
if (callback_count() > kNumBuffers) {
::Sleep(lag_in_ms_);
}
@@ -140,7 +141,7 @@
class MockAudioSource : public AudioOutputStream::AudioSourceCallback {
public:
- MOCK_METHOD4(OnMoreData, uint32(AudioOutputStream* stream, uint8* dest,
+ MOCK_METHOD3(OnMoreData, uint32(uint8* dest,
uint32 max_size,
AudioBuffersState buffers_state));
MOCK_METHOD2(OnError, void(AudioOutputStream* stream, int code));
@@ -605,28 +606,28 @@
// new one. And then we will try to provide zero data so the amount of
// pending bytes will go down and eventually read zero.
InSequence s;
- EXPECT_CALL(source, OnMoreData(oas, NotNull(), bytes_100_ms,
+ EXPECT_CALL(source, OnMoreData(NotNull(), bytes_100_ms,
Field(&AudioBuffersState::pending_bytes, 0)))
.WillOnce(Return(bytes_100_ms));
- EXPECT_CALL(source, OnMoreData(oas, NotNull(), bytes_100_ms,
+ EXPECT_CALL(source, OnMoreData(NotNull(), bytes_100_ms,
Field(&AudioBuffersState::pending_bytes,
bytes_100_ms)))
.WillOnce(Return(bytes_100_ms));
- EXPECT_CALL(source, OnMoreData(oas, NotNull(), bytes_100_ms,
+ EXPECT_CALL(source, OnMoreData(NotNull(), bytes_100_ms,
Field(&AudioBuffersState::pending_bytes,
2 * bytes_100_ms)))
.WillOnce(Return(bytes_100_ms));
- EXPECT_CALL(source, OnMoreData(oas, NotNull(), bytes_100_ms,
+ EXPECT_CALL(source, OnMoreData(NotNull(), bytes_100_ms,
Field(&AudioBuffersState::pending_bytes,
2 * bytes_100_ms)))
.Times(AnyNumber())
.WillRepeatedly(Return(0));
- EXPECT_CALL(source, OnMoreData(oas, NotNull(), bytes_100_ms,
+ EXPECT_CALL(source, OnMoreData(NotNull(), bytes_100_ms,
Field(&AudioBuffersState::pending_bytes,
bytes_100_ms)))
.Times(AnyNumber())
.WillRepeatedly(Return(0));
- EXPECT_CALL(source, OnMoreData(oas, NotNull(), bytes_100_ms,
+ EXPECT_CALL(source, OnMoreData(NotNull(), bytes_100_ms,
Field(&AudioBuffersState::pending_bytes, 0)))
.Times(AnyNumber())
.WillRepeatedly(Return(0));
@@ -648,8 +649,8 @@
}
// AudioSourceCallback::OnMoreData implementation:
- virtual uint32 OnMoreData(AudioOutputStream* stream,
- uint8* dest, uint32 max_size,
+ virtual uint32 OnMoreData(uint8* dest,
+ uint32 max_size,
AudioBuffersState buffers_state) {
socket_->Send(&buffers_state, sizeof(buffers_state));
uint32 got = socket_->Receive(dest, max_size);
@@ -684,7 +685,7 @@
uint8* buffer = new uint8[kTwoSecBytes];
SineWaveAudioSource sine(SineWaveAudioSource::FORMAT_16BIT_LINEAR_PCM,
1, ctx.sine_freq, ctx.sample_rate);
- sine.OnMoreData(NULL, buffer, kTwoSecBytes, AudioBuffersState());
+ sine.OnMoreData(buffer, kTwoSecBytes, AudioBuffersState());
AudioBuffersState buffers_state;
int times = 0;
« no previous file with comments | « media/audio/win/audio_low_latency_output_win_unittest.cc ('k') | media/audio/win/waveout_output_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698