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

Unified Diff: media/audio/sounds/audio_stream_handler.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/audio_stream_handler.h
diff --git a/media/audio/sounds/audio_stream_handler.h b/media/audio/sounds/audio_stream_handler.h
index 7c63a24f0348f3fb4228ed1bacde363ad773a772..009d1a0991291d48d5f2fb992d5362fc627cceaa 100644
--- a/media/audio/sounds/audio_stream_handler.h
+++ b/media/audio/sounds/audio_stream_handler.h
@@ -11,12 +11,13 @@
#include "base/threading/non_thread_safe.h"
#include "media/audio/audio_io.h"
#include "media/audio/audio_parameters.h"
-#include "media/audio/sounds/wav_audio_handler.h"
+#include "media/audio/sounds/wav_parser.h"
#include "media/base/media_export.h"
namespace media {
class AudioManager;
+class WavReader;
// This class sends a sound to the audio manager.
class MEDIA_EXPORT AudioStreamHandler : public base::NonThreadSafe {
@@ -30,6 +31,9 @@ class MEDIA_EXPORT AudioStreamHandler : public base::NonThreadSafe {
// Called when AudioOutputStreamProxy::Start() was successfully called.
virtual void OnPlay() = 0;
+ // Called when current sound is replayed.
+ virtual void OnReplay() = 0;
+
// Called when AudioOutputStreamProxy::Stop() was successfully called.
virtual void OnStop(size_t cursor) = 0;
};
@@ -51,7 +55,7 @@ class MEDIA_EXPORT AudioStreamHandler : public base::NonThreadSafe {
// Stops current playback.
void Stop();
- const WavAudioHandler& wav_audio_handler() const { return wav_audio_; }
+ const WavParser& wav_parser() const { return wav_parser_; }
private:
friend class AudioStreamHandlerTest;
@@ -62,8 +66,12 @@ class MEDIA_EXPORT AudioStreamHandler : public base::NonThreadSafe {
static void SetObserverForTesting(TestObserver* observer);
static void SetAudioSourceForTesting(
AudioOutputStream::AudioSourceCallback* source);
+ void SetWavReaderForTesting(WavReader* reader);
+ void AllowReplayOnceForTesting();
+
+ void StopAfterDelay();
- WavAudioHandler wav_audio_;
+ WavParser wav_parser_;
scoped_ptr<AudioStreamContainer> stream_;
bool initialized_;

Powered by Google App Engine
This is Rietveld 408576698