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

Unified Diff: third_party/WebKit/Source/modules/webaudio/BaseAudioContext.h

Issue 2085353008: Allow disabling of resampling in decodeAudioData Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 4 years, 5 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
Index: third_party/WebKit/Source/modules/webaudio/BaseAudioContext.h
diff --git a/third_party/WebKit/Source/modules/webaudio/BaseAudioContext.h b/third_party/WebKit/Source/modules/webaudio/BaseAudioContext.h
index 585dec1f71edfef74b2d750455901d5eb155803e..e4d1fd0f9ae75929f9b50392b25853f2e5f7e91e 100644
--- a/third_party/WebKit/Source/modules/webaudio/BaseAudioContext.h
+++ b/third_party/WebKit/Source/modules/webaudio/BaseAudioContext.h
@@ -57,6 +57,7 @@ class BiquadFilterNode;
class ChannelMergerNode;
class ChannelSplitterNode;
class ConvolverNode;
+class DecodeAudioDataOptions;
class DelayNode;
class Dictionary;
class Document;
@@ -141,6 +142,7 @@ public:
// Asynchronous audio file data decoding.
ScriptPromise decodeAudioData(ScriptState*, DOMArrayBuffer* audioData, AudioBufferCallback* successCallback, AudioBufferCallback* errorCallback, ExceptionState&);
+ ScriptPromise decodeAudioData(ScriptState*, DOMArrayBuffer* audioData, const DecodeAudioDataOptions&, ExceptionState&);
// Handles the promise and callbacks when |decodeAudioData| is finished decoding.
void handleDecodeAudioData(AudioBuffer*, ScriptPromiseResolver*, AudioBufferCallback* successCallback, AudioBufferCallback* errorCallback);
@@ -300,6 +302,14 @@ private:
bool m_isCleared;
void clear();
+ ScriptPromise decodeAudioData(
+ ScriptState*,
+ DOMArrayBuffer* audioData,
+ bool disableResampling,
+ AudioBufferCallback* successCallback,
+ AudioBufferCallback* errorCallback,
+ ExceptionState&);
+
// When the context goes away, there might still be some sources which
// haven't finished playing. Make sure to release them here.
void releaseActiveSourceNodes();

Powered by Google App Engine
This is Rietveld 408576698