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

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

Issue 1453233002: Improve input handling for WaveAudioHandler. (Closed) Base URL: https://chromium.googlesource.com/chromium/src@master
Patch Set: Formatting Created 5 years, 1 month 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/simple_sources_unittest.cc ('k') | media/audio/sounds/audio_stream_handler.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 f814aaef5993b793052fd54bf80105f8c634d57e..4caa6031d3e80388a8cafdb631a6734567f8633d 100644
--- a/media/audio/sounds/audio_stream_handler.h
+++ b/media/audio/sounds/audio_stream_handler.h
@@ -9,9 +9,9 @@
#include "base/compiler_specific.h"
#include "base/strings/string_piece.h"
#include "base/threading/non_thread_safe.h"
+#include "base/time/time.h"
#include "media/audio/audio_io.h"
#include "media/audio/audio_parameters.h"
-#include "media/audio/sounds/wav_audio_handler.h"
#include "media/base/media_export.h"
namespace media {
@@ -53,7 +53,8 @@ class MEDIA_EXPORT AudioStreamHandler : public base::NonThreadSafe {
// Stops current playback.
void Stop();
- const WavAudioHandler& wav_audio_handler() const { return wav_audio_; }
+ // Get the duration of the WAV data passed in.
+ base::TimeDelta duration() const;
private:
friend class AudioStreamHandlerTest;
@@ -65,11 +66,9 @@ class MEDIA_EXPORT AudioStreamHandler : public base::NonThreadSafe {
static void SetAudioSourceForTesting(
AudioOutputStream::AudioSourceCallback* source);
- WavAudioHandler wav_audio_;
+ base::TimeDelta duration_;
scoped_ptr<AudioStreamContainer> stream_;
- bool initialized_;
-
DISALLOW_COPY_AND_ASSIGN(AudioStreamHandler);
};
« no previous file with comments | « media/audio/simple_sources_unittest.cc ('k') | media/audio/sounds/audio_stream_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698