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

Side by Side Diff: media/audio/clockless_audio_sink.h

Issue 623263003: replace OVERRIDE and FINAL with override and final in media/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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 unified diff | Download patch
« no previous file with comments | « media/audio/audio_output_resampler.cc ('k') | media/audio/clockless_audio_sink.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef MEDIA_AUDIO_CLOCKLESS_AUDIO_SINK_H_ 5 #ifndef MEDIA_AUDIO_CLOCKLESS_AUDIO_SINK_H_
6 #define MEDIA_AUDIO_CLOCKLESS_AUDIO_SINK_H_ 6 #define MEDIA_AUDIO_CLOCKLESS_AUDIO_SINK_H_
7 7
8 #include "base/memory/scoped_ptr.h" 8 #include "base/memory/scoped_ptr.h"
9 #include "base/time/time.h" 9 #include "base/time/time.h"
10 #include "media/base/audio_renderer_sink.h" 10 #include "media/base/audio_renderer_sink.h"
11 11
12 namespace base { 12 namespace base {
13 class SingleThreadTaskRunner; 13 class SingleThreadTaskRunner;
14 } 14 }
15 15
16 namespace media { 16 namespace media {
17 class AudioBus; 17 class AudioBus;
18 class ClocklessAudioSinkThread; 18 class ClocklessAudioSinkThread;
19 19
20 // Implementation of an AudioRendererSink that consumes the audio as fast as 20 // Implementation of an AudioRendererSink that consumes the audio as fast as
21 // possible. This class does not support multiple Play()/Pause() events. 21 // possible. This class does not support multiple Play()/Pause() events.
22 class MEDIA_EXPORT ClocklessAudioSink 22 class MEDIA_EXPORT ClocklessAudioSink
23 : NON_EXPORTED_BASE(public AudioRendererSink) { 23 : NON_EXPORTED_BASE(public AudioRendererSink) {
24 public: 24 public:
25 ClocklessAudioSink(); 25 ClocklessAudioSink();
26 26
27 // AudioRendererSink implementation. 27 // AudioRendererSink implementation.
28 virtual void Initialize(const AudioParameters& params, 28 virtual void Initialize(const AudioParameters& params,
29 RenderCallback* callback) OVERRIDE; 29 RenderCallback* callback) override;
30 virtual void Start() OVERRIDE; 30 virtual void Start() override;
31 virtual void Stop() OVERRIDE; 31 virtual void Stop() override;
32 virtual void Pause() OVERRIDE; 32 virtual void Pause() override;
33 virtual void Play() OVERRIDE; 33 virtual void Play() override;
34 virtual bool SetVolume(double volume) OVERRIDE; 34 virtual bool SetVolume(double volume) override;
35 35
36 // Returns the time taken to consume all the audio. 36 // Returns the time taken to consume all the audio.
37 base::TimeDelta render_time() { return playback_time_; } 37 base::TimeDelta render_time() { return playback_time_; }
38 38
39 protected: 39 protected:
40 virtual ~ClocklessAudioSink(); 40 virtual ~ClocklessAudioSink();
41 41
42 private: 42 private:
43 scoped_ptr<ClocklessAudioSinkThread> thread_; 43 scoped_ptr<ClocklessAudioSinkThread> thread_;
44 bool initialized_; 44 bool initialized_;
45 bool playing_; 45 bool playing_;
46 46
47 // Time taken in last set of Render() calls. 47 // Time taken in last set of Render() calls.
48 base::TimeDelta playback_time_; 48 base::TimeDelta playback_time_;
49 49
50 DISALLOW_COPY_AND_ASSIGN(ClocklessAudioSink); 50 DISALLOW_COPY_AND_ASSIGN(ClocklessAudioSink);
51 }; 51 };
52 52
53 } // namespace media 53 } // namespace media
54 54
55 #endif // MEDIA_AUDIO_CLOCKLESS_AUDIO_SINK_H_ 55 #endif // MEDIA_AUDIO_CLOCKLESS_AUDIO_SINK_H_
OLDNEW
« no previous file with comments | « media/audio/audio_output_resampler.cc ('k') | media/audio/clockless_audio_sink.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698