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

Unified Diff: Source/modules/webaudio/AudioContext.h

Issue 1097873003: Revert of AudioContext.decodeAudioData returns a Promise (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 8 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/AudioBufferCallback.idl ('k') | Source/modules/webaudio/AudioContext.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/modules/webaudio/AudioContext.h
diff --git a/Source/modules/webaudio/AudioContext.h b/Source/modules/webaudio/AudioContext.h
index cb7253dcb34279bed616e7243a1b3b0d6d988bd7..6e17e01ef814888c23a2366325e40c5377f58e0b 100644
--- a/Source/modules/webaudio/AudioContext.h
+++ b/Source/modules/webaudio/AudioContext.h
@@ -237,7 +237,7 @@
AudioBuffer* createBuffer(unsigned numberOfChannels, size_t numberOfFrames, float sampleRate, ExceptionState&);
// Asynchronous audio file data decoding.
- ScriptPromise decodeAudioData(ScriptState*, DOMArrayBuffer*, AudioBufferCallback*, AudioBufferCallback*, ExceptionState&);
+ void decodeAudioData(DOMArrayBuffer*, AudioBufferCallback*, AudioBufferCallback*, ExceptionState&);
AudioListener* listener() { return m_listener.get(); }
@@ -348,7 +348,6 @@
// Get the security origin for this audio context.
SecurityOrigin* securityOrigin() const;
- void removeAudioDecoderResolver(ScriptPromiseResolver*);
protected:
explicit AudioContext(Document*);
AudioContext(Document*, unsigned numberOfChannels, size_t numberOfFrames, float sampleRate);
@@ -435,19 +434,12 @@
void setContextState(AudioContextState);
AsyncAudioDecoder m_audioDecoder;
- // A vector of the ScriptPromiseResolvers the decodeAudioData method uses.
- WillBeHeapVector<RefPtrWillBeMember<ScriptPromiseResolver>> m_audioDecoderResolvers;
// The Promise that is returned by close();
RefPtrWillBeMember<ScriptPromiseResolver> m_closeResolver;
// Follows the destination's currentSampleFrame, but might be slightly behind due to locking.
size_t m_cachedSampleFrame;
-
- // When a context is closed, the sample rate is cleared. But decodeAudioData can be called
- // after the context has been closed and it needs the sample rate. When the context is closed,
- // the sample rate is saved here.
- float m_closedContextSampleRate;
// Tries to handle AudioBufferSourceNodes that were started but became disconnected or was never
// connected. Because these never get pulled anymore, they will stay around forever. So if we
« no previous file with comments | « Source/modules/webaudio/AudioBufferCallback.idl ('k') | Source/modules/webaudio/AudioContext.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698