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

Unified Diff: media/audio/sounds/test_data.h

Issue 115693004: Added volume adjust sound behind the flag. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix. Created 7 years 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
Index: media/audio/sounds/test_data.h
diff --git a/media/audio/sounds/test_data.h b/media/audio/sounds/test_data.h
index d7fb11ddb6b837602aad95f5ed03b12d88692990..cd12e8ff24f96e31af5b3ad01da9d1d37077fc66 100644
--- a/media/audio/sounds/test_data.h
+++ b/media/audio/sounds/test_data.h
@@ -9,6 +9,8 @@
#include "base/callback.h"
#include "base/compiler_specific.h"
#include "media/audio/sounds/audio_stream_handler.h"
+#include "media/audio/sounds/wav_parser.h"
+#include "media/audio/sounds/wav_reader.h"
namespace base {
class MessageLoop;
@@ -29,9 +31,11 @@ class TestObserver : public AudioStreamHandler::TestObserver {
// AudioStreamHandler::TestObserver implementation:
virtual void OnPlay() OVERRIDE;
+ virtual void OnReplay() OVERRIDE;
virtual void OnStop(size_t cursor) OVERRIDE;
int num_play_requests() const { return num_play_requests_; }
+ int num_replays() const { return num_replays_; }
int num_stop_requests() const { return num_stop_requests_; }
int cursor() const { return cursor_; }
@@ -40,12 +44,31 @@ class TestObserver : public AudioStreamHandler::TestObserver {
base::Closure quit_;
int num_play_requests_;
+ int num_replays_;
int num_stop_requests_;
int cursor_;
DISALLOW_COPY_AND_ASSIGN(TestObserver);
};
+class TestWavReader : public WavReader {
+ public:
+ explicit TestWavReader(const WavParser& parser);
+ virtual ~TestWavReader();
+
+ // WavReader implementation:
+ virtual bool AtEnd(size_t cursor) OVERRIDE;
+ virtual bool CopyTo(AudioBus* bus,
+ size_t cursor,
+ size_t* bytes_written) OVERRIDE;
+
+ void SimulateAtEndOnce();
+
+ private:
+ const WavParser parser_;
+ int num_simulate_at_end_requests_;
+};
+
} // namespace media
#endif // MEDIA_AUDIO_SOUNDS_TEST_UTILS_H_

Powered by Google App Engine
This is Rietveld 408576698