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

Side by Side Diff: media/base/audio_renderer_mixer_input.h

Issue 10703191: Remove GetVolume from media::AudioRendererSink. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 5 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 | Annotate | Revision Log
« no previous file with comments | « media/audio/null_audio_sink.cc ('k') | media/base/audio_renderer_sink.h » ('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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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_BASE_AUDIO_RENDERER_MIXER_INPUT_H_ 5 #ifndef MEDIA_BASE_AUDIO_RENDERER_MIXER_INPUT_H_
6 #define MEDIA_BASE_AUDIO_RENDERER_MIXER_INPUT_H_ 6 #define MEDIA_BASE_AUDIO_RENDERER_MIXER_INPUT_H_
7 7
8 #include <vector> 8 #include <vector>
9 9
10 #include "media/base/audio_renderer_sink.h" 10 #include "media/base/audio_renderer_sink.h"
(...skipping 13 matching lines...) Expand all
24 const std::vector<float*>& audio_data() { return audio_data_; } 24 const std::vector<float*>& audio_data() { return audio_data_; }
25 AudioRendererSink::RenderCallback* callback() { return callback_; } 25 AudioRendererSink::RenderCallback* callback() { return callback_; }
26 bool playing() { return playing_; } 26 bool playing() { return playing_; }
27 27
28 // AudioRendererSink implementation. 28 // AudioRendererSink implementation.
29 virtual void Start() OVERRIDE; 29 virtual void Start() OVERRIDE;
30 virtual void Stop() OVERRIDE; 30 virtual void Stop() OVERRIDE;
31 virtual void Play() OVERRIDE; 31 virtual void Play() OVERRIDE;
32 virtual void Pause(bool flush) OVERRIDE; 32 virtual void Pause(bool flush) OVERRIDE;
33 virtual bool SetVolume(double volume) OVERRIDE; 33 virtual bool SetVolume(double volume) OVERRIDE;
34 virtual void GetVolume(double* volume) OVERRIDE;
35 virtual void Initialize(const AudioParameters& params, 34 virtual void Initialize(const AudioParameters& params,
36 AudioRendererSink::RenderCallback* renderer) OVERRIDE; 35 AudioRendererSink::RenderCallback* renderer) OVERRIDE;
37 36
37 void GetVolume(double* volume);
38
38 protected: 39 protected:
39 virtual ~AudioRendererMixerInput(); 40 virtual ~AudioRendererMixerInput();
40 41
41 private: 42 private:
42 bool playing_; 43 bool playing_;
43 bool initialized_; 44 bool initialized_;
44 double volume_; 45 double volume_;
45 46
46 // AudioRendererMixer is reference counted by all its AudioRendererMixerInputs 47 // AudioRendererMixer is reference counted by all its AudioRendererMixerInputs
47 // and is destroyed when all AudioRendererMixerInputs have called RemoveMixer. 48 // and is destroyed when all AudioRendererMixerInputs have called RemoveMixer.
48 scoped_refptr<AudioRendererMixer> mixer_; 49 scoped_refptr<AudioRendererMixer> mixer_;
49 50
50 // Source of audio data which is provided to the mixer. 51 // Source of audio data which is provided to the mixer.
51 AudioRendererSink::RenderCallback* callback_; 52 AudioRendererSink::RenderCallback* callback_;
52 53
53 // Vector for rendering audio data which will be used by the mixer. 54 // Vector for rendering audio data which will be used by the mixer.
54 std::vector<float*> audio_data_; 55 std::vector<float*> audio_data_;
55 56
56 DISALLOW_COPY_AND_ASSIGN(AudioRendererMixerInput); 57 DISALLOW_COPY_AND_ASSIGN(AudioRendererMixerInput);
57 }; 58 };
58 59
59 } // namespace media 60 } // namespace media
60 61
61 #endif // MEDIA_BASE_AUDIO_RENDERER_MIXER_INPUT_H_ 62 #endif // MEDIA_BASE_AUDIO_RENDERER_MIXER_INPUT_H_
OLDNEW
« no previous file with comments | « media/audio/null_audio_sink.cc ('k') | media/base/audio_renderer_sink.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698