Lines Matching defs:AudioBus

40 // An AudioBus represents a collection of one or more AudioChannels.
42 // An AudioBus with one channel is mono, an AudioBus with two channels is stereo, etc.
43 class PLATFORM_EXPORT AudioBus : public ThreadSafeRefCounted<AudioBus> {
44 WTF_MAKE_NONCOPYABLE(AudioBus);
68 // If allocate is false then setChannelMemory() has to be called later on for each channel before the AudioBus is useable...
69 static PassRefPtr<AudioBus> create(unsigned numberOfChannels, size_t length, bool allocate = true);
78 const AudioChannel* channel(unsigned channel) const { return const_cast<AudioBus*>(this)->m_channels[channel].get(); }
103 bool topologyMatches(const AudioBus &sourceBus) const;
107 static PassRefPtr<AudioBus> createBufferFromRange(const AudioBus* sourceBuffer, unsigned startFrame, unsigned endFrame);
110 // Creates a new AudioBus by sample-rate converting sourceBus to the newSampleRate.
113 static PassRefPtr<AudioBus> createBySampleRateConverting(const AudioBus* sourceBus, bool mixToMono, double newSampleRate);
115 // Creates a new AudioBus by mixing all the channels down to mono.
116 // If sourceBus is already mono, then the returned AudioBus will simply be a copy.
117 static PassRefPtr<AudioBus> createByMixingToMono(const AudioBus* sourceBus);
126 void copyFrom(const AudioBus& sourceBus, ChannelInterpretation = Speakers);
130 void sumFrom(const AudioBus& sourceBus, ChannelInterpretation = Speakers);
136 void copyWithGainFrom(const AudioBus &sourceBus, float* lastMixGain, float targetGain);
139 void copyWithSampleAccurateGainValuesFrom(const AudioBus &sourceBus, float* gainValues, unsigned numberOfGainValues);
147 static PassRefPtr<AudioBus> loadPlatformResource(const char* name, float sampleRate);
150 AudioBus() { };
152 AudioBus(unsigned numberOfChannels, size_t length, bool allocate);
154 void speakersCopyFrom(const AudioBus&);
155 void discreteCopyFrom(const AudioBus&);
156 void speakersSumFrom(const AudioBus&);
157 void discreteSumFrom(const AudioBus&);
158 void speakersSumFrom5_1_ToMono(const AudioBus&);