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

Side by Side Diff: media/filters/audio_renderer_impl.h

Issue 7796033: Replace AudioDecoderConfig with simple accessors on AudioDecoder. (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: rebase Created 9 years, 3 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/filters/audio_renderer_base_unittest.cc ('k') | media/filters/audio_renderer_impl.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 (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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_FILTERS_AUDIO_RENDERER_IMPL_H_ 5 #ifndef MEDIA_FILTERS_AUDIO_RENDERER_IMPL_H_
6 #define MEDIA_FILTERS_AUDIO_RENDERER_IMPL_H_ 6 #define MEDIA_FILTERS_AUDIO_RENDERER_IMPL_H_
7 7
8 // This is the default implementation of AudioRenderer, which uses the audio 8 // This is the default implementation of AudioRenderer, which uses the audio
9 // interfaces to open an audio device. Although it cannot be used in the 9 // interfaces to open an audio device. Although it cannot be used in the
10 // sandbox, it serves as a reference implementation and can be used in other 10 // sandbox, it serves as a reference implementation and can be used in other
(...skipping 27 matching lines...) Expand all
38 virtual void SetVolume(float volume); 38 virtual void SetVolume(float volume);
39 39
40 // AudioSourceCallback implementation. 40 // AudioSourceCallback implementation.
41 virtual uint32 OnMoreData(AudioOutputStream* stream, uint8* dest, 41 virtual uint32 OnMoreData(AudioOutputStream* stream, uint8* dest,
42 uint32 len, AudioBuffersState buffers_state); 42 uint32 len, AudioBuffersState buffers_state);
43 virtual void OnClose(AudioOutputStream* stream); 43 virtual void OnClose(AudioOutputStream* stream);
44 virtual void OnError(AudioOutputStream* stream, int code); 44 virtual void OnError(AudioOutputStream* stream, int code);
45 45
46 protected: 46 protected:
47 // AudioRendererBase implementation. 47 // AudioRendererBase implementation.
48 virtual bool OnInitialize(const AudioDecoderConfig& config); 48 virtual bool OnInitialize(int bits_per_channel,
49 ChannelLayout channel_layout,
50 int sample_rate);
49 virtual void OnStop(); 51 virtual void OnStop();
50 52
51 private: 53 private:
52 // Audio output stream device. 54 // Audio output stream device.
53 AudioOutputStream* stream_; 55 AudioOutputStream* stream_;
54 int bytes_per_second_; 56 int bytes_per_second_;
55 57
56 DISALLOW_COPY_AND_ASSIGN(AudioRendererImpl); 58 DISALLOW_COPY_AND_ASSIGN(AudioRendererImpl);
57 }; 59 };
58 60
59 } // namespace media 61 } // namespace media
60 62
61 #endif // MEDIA_FILTERS_AUDIO_RENDERER_IMPL_H_ 63 #endif // MEDIA_FILTERS_AUDIO_RENDERER_IMPL_H_
OLDNEW
« no previous file with comments | « media/filters/audio_renderer_base_unittest.cc ('k') | media/filters/audio_renderer_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698