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

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

Issue 155695: Replace the guts of AudioRendererBase with calls to scaling algorithm. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 4 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) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 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 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 // Only allow a factory to create this class. 51 // Only allow a factory to create this class.
52 friend class FilterFactoryImpl0<AudioRendererImpl>; 52 friend class FilterFactoryImpl0<AudioRendererImpl>;
53 AudioRendererImpl(); 53 AudioRendererImpl();
54 virtual ~AudioRendererImpl(); 54 virtual ~AudioRendererImpl();
55 55
56 // AudioRendererBase implementation. 56 // AudioRendererBase implementation.
57 virtual bool OnInitialize(const MediaFormat& media_format); 57 virtual bool OnInitialize(const MediaFormat& media_format);
58 virtual void OnStop(); 58 virtual void OnStop();
59 59
60 private: 60 private:
61 // Playback rate
62 // 0.0f is paused, 0.5f is half speed, 1.0f is normal, 2.0f is double speed.
63 // Rate should normally be any value between 0.5 and 3.0.
64 float playback_rate_;
65
66 // Audio output stream device. 61 // Audio output stream device.
67 AudioOutputStream* stream_; 62 AudioOutputStream* stream_;
68 63
69 DISALLOW_COPY_AND_ASSIGN(AudioRendererImpl); 64 DISALLOW_COPY_AND_ASSIGN(AudioRendererImpl);
70 }; 65 };
71 66
72 } // namespace media 67 } // namespace media
73 68
74 #endif // MEDIA_FILTERS_AUDIO_RENDERER_IMPL_H_ 69 #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