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

Unified Diff: Source/platform/audio/AudioUtilities.h

Issue 565643003: Move utility functions for sample rate to AudioUtilities. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Add modification in MediaElementSourceNode. Created 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/modules/webaudio/OfflineAudioContext.cpp ('k') | Source/platform/audio/AudioUtilities.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/platform/audio/AudioUtilities.h
diff --git a/Source/platform/audio/AudioUtilities.h b/Source/platform/audio/AudioUtilities.h
index a7e02d721f2435224c4081f2ff9c4f8a9b55992c..1fd287a7fdbb6a599975892a84cb707eab57d41f 100644
--- a/Source/platform/audio/AudioUtilities.h
+++ b/Source/platform/audio/AudioUtilities.h
@@ -42,6 +42,12 @@ PLATFORM_EXPORT double discreteTimeConstantForSampleRate(double timeConstant, do
// Convert the time to a sample frame at the given sample rate.
PLATFORM_EXPORT size_t timeToSampleFrame(double time, double sampleRate);
+// Check that |sampleRate| is a valid rate for AudioBuffers.
+PLATFORM_EXPORT bool isValidAudioBufferSampleRate(float sampleRate);
+
+// Return max/min sample rate supported by AudioBuffers.
+PLATFORM_EXPORT float minAudioBufferSampleRate();
+PLATFORM_EXPORT float maxAudioBufferSampleRate();
} // AudioUtilites
} // namespace blink
« no previous file with comments | « Source/modules/webaudio/OfflineAudioContext.cpp ('k') | Source/platform/audio/AudioUtilities.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698