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

Side by Side Diff: media/audio/sounds/wav_reader.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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef MEDIA_AUDIO_SOUNDS_WAV_READER_H_
6 #define MEDIA_AUDIO_SOUNDS_WAV_READER_H_
7
8 #include "base/compiler_specific.h"
9 #include "media/audio/sounds/wav_parser.h"
10
11 namespace media {
12
13 class AudioBus;
14
15 class MEDIA_EXPORT WavReader {
16 public:
17 WavReader() {}
18 virtual ~WavReader() {}
19
20 // Returns true when cursor points to the end of the track.
21 virtual bool AtEnd(size_t cursor) = 0;
22
23 // Copies the audio data to |bus| starting from the |cursor| and in
24 // the case of success stores the number of written bytes in
25 // |bytes_written|. |bytes_written| should not be NULL.
26 virtual bool CopyTo(AudioBus* bus, size_t cursor, size_t* bytes_written) = 0;
27 };
28
29 class MEDIA_EXPORT WavReaderImpl : public WavReader {
30 public:
31 explicit WavReaderImpl(const WavParser& wav_parser);
32 virtual ~WavReaderImpl();
33
34 // WavReader implementation:
35 virtual bool AtEnd(size_t cursor) OVERRIDE;
36 virtual bool CopyTo(AudioBus* bus,
37 size_t cursor,
38 size_t* bytes_written) OVERRIDE;
39
40 private:
41 WavParser wav_parser_;
42 };
43
44 } // namespace media
45
46 #endif // MEDIA_AUDIO_SOUNDS_WAV_READER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698