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

Unified Diff: media/base/audio_renderer_mixer.h

Issue 11410012: Collapse AudioRendererMixer and OnMoreDataResampler into AudioTransform. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rename. Comments. Created 8 years, 1 month 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « media/base/audio_pull_fifo_unittest.cc ('k') | media/base/audio_renderer_mixer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/base/audio_renderer_mixer.h
diff --git a/media/base/audio_renderer_mixer.h b/media/base/audio_renderer_mixer.h
index 7bb85af449613754306114c8d7eefa8d60b069c5..bac048ddf01d60238905661adb0b2e0e24f4363c 100644
--- a/media/base/audio_renderer_mixer.h
+++ b/media/base/audio_renderer_mixer.h
@@ -5,20 +5,18 @@
#ifndef MEDIA_BASE_AUDIO_RENDERER_MIXER_H_
#define MEDIA_BASE_AUDIO_RENDERER_MIXER_H_
-#include <set>
+#include <list>
#include "base/synchronization/lock.h"
+#include "media/base/audio_converter.h"
#include "media/base/audio_renderer_mixer_input.h"
#include "media/base/audio_renderer_sink.h"
-#include "media/base/multi_channel_resampler.h"
namespace media {
// Mixes a set of AudioRendererMixerInputs into a single output stream which is
// funneled into a single shared AudioRendererSink; saving a bundle on renderer
-// side resources. Resampling is done post-mixing as it is the most expensive
-// process. If the input sample rate matches the audio hardware sample rate, no
-// resampling is done.
+// side resources.
class MEDIA_EXPORT AudioRendererMixer
: NON_EXPORTED_BASE(public AudioRendererSink::RenderCallback) {
public:
@@ -37,33 +35,18 @@ class MEDIA_EXPORT AudioRendererMixer
int audio_delay_milliseconds) OVERRIDE;
virtual void OnRenderError() OVERRIDE;
- // Handles mixing and volume adjustment. Fully fills |audio_bus| with mixed
- // audio data. When resampling is necessary, ProvideInput() will be called
- // by MultiChannelResampler when more data is necessary.
- void ProvideInput(AudioBus* audio_bus);
-
// Output sink for this mixer.
scoped_refptr<AudioRendererSink> audio_sink_;
// Set of mixer inputs to be mixed by this mixer. Access is thread-safe
// through |mixer_inputs_lock_|.
- typedef std::set< scoped_refptr<AudioRendererMixerInput> >
+ typedef std::list<scoped_refptr<AudioRendererMixerInput> >
AudioRendererMixerInputSet;
AudioRendererMixerInputSet mixer_inputs_;
base::Lock mixer_inputs_lock_;
- // Vector for rendering audio data from each mixer input.
- scoped_ptr<AudioBus> mixer_input_audio_bus_;
-
- // Handles resampling post-mixing.
- scoped_ptr<MultiChannelResampler> resampler_;
-
- // The audio delay in milliseconds received by the last Render() call.
- int current_audio_delay_milliseconds_;
-
- // Ratio of input data to output data. Used to scale audio delay information.
- double io_ratio_;
- double input_ms_per_frame_;
+ // Handles mixing and resampling between input and output parameters.
+ AudioConverter audio_converter_;
DISALLOW_COPY_AND_ASSIGN(AudioRendererMixer);
};
« no previous file with comments | « media/base/audio_pull_fifo_unittest.cc ('k') | media/base/audio_renderer_mixer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698