summaryrefslogtreecommitdiffstats
path: root/Source/WebCore/platform/audio/AudioBus.h
diff options
context:
space:
mode:
Diffstat (limited to 'Source/WebCore/platform/audio/AudioBus.h')
-rw-r--r--Source/WebCore/platform/audio/AudioBus.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/Source/WebCore/platform/audio/AudioBus.h b/Source/WebCore/platform/audio/AudioBus.h
index 888f6bf..1943c0d 100644
--- a/Source/WebCore/platform/audio/AudioBus.h
+++ b/Source/WebCore/platform/audio/AudioBus.h
@@ -89,6 +89,18 @@ public:
// 0 may be returned if the range does not fit in the sourceBuffer
static PassOwnPtr<AudioBus> createBufferFromRange(AudioBus* sourceBuffer, unsigned startFrame, unsigned endFrame);
+
+#if !PLATFORM(MAC)
+ // Creates a new AudioBus by sample-rate converting sourceBus to the newSampleRate.
+ // setSampleRate() must have been previously called on sourceBus.
+ // Note: sample-rate conversion is already handled in the file-reading code for the mac port, so we don't need this.
+ static PassOwnPtr<AudioBus> createBySampleRateConverting(AudioBus* sourceBus, bool mixToMono, double newSampleRate);
+#endif
+
+ // Creates a new AudioBus by mixing all the channels down to mono.
+ // If sourceBus is already mono, then the returned AudioBus will simply be a copy.
+ static PassOwnPtr<AudioBus> createByMixingToMono(AudioBus* sourceBus);
+
// Scales all samples by the same amount.
void scale(double scale);