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

Side by Side Diff: third_party/WebKit/Source/modules/webaudio/AudioContext.h

Issue 2060833002: Implementation of 'AudioContext.getOutputTimestamp' method (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Added implementation for ALSA. 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 unified diff | Download patch
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef AudioContext_h 5 #ifndef AudioContext_h
6 #define AudioContext_h 6 #define AudioContext_h
7 7
8 #include "bindings/core/v8/ScriptPromise.h" 8 #include "bindings/core/v8/ScriptPromise.h"
9 #include "bindings/core/v8/ScriptPromiseResolver.h" 9 #include "bindings/core/v8/ScriptPromiseResolver.h"
10 #include "modules/webaudio/AbstractAudioContext.h" 10 #include "modules/webaudio/AbstractAudioContext.h"
(...skipping 15 matching lines...) Expand all
26 DECLARE_VIRTUAL_TRACE(); 26 DECLARE_VIRTUAL_TRACE();
27 27
28 ScriptPromise closeContext(ScriptState*) final; 28 ScriptPromise closeContext(ScriptState*) final;
29 bool isContextClosed() const final; 29 bool isContextClosed() const final;
30 30
31 ScriptPromise suspendContext(ScriptState*) final; 31 ScriptPromise suspendContext(ScriptState*) final;
32 ScriptPromise resumeContext(ScriptState*) final; 32 ScriptPromise resumeContext(ScriptState*) final;
33 33
34 bool hasRealtimeConstraint() final { return true; } 34 bool hasRealtimeConstraint() final { return true; }
35 35
36 void getOutputTimestamp(AudioTimestamp&) final;
37
36 protected: 38 protected:
37 AudioContext(Document&); 39 AudioContext(Document&);
38 40
39 void didClose() final; 41 void didClose() final;
40 42
41 private: 43 private:
42 void stopRendering(); 44 void stopRendering();
43 45
44 unsigned m_contextId; 46 unsigned m_contextId;
45 Member<ScriptPromiseResolver> m_closeResolver; 47 Member<ScriptPromiseResolver> m_closeResolver;
48 size_t m_outputTimestampFramesOrigin; // Set after every supend/resume.
46 }; 49 };
47 50
48 } // namespace blink 51 } // namespace blink
49 52
50 #endif // AudioContext_h 53 #endif // AudioContext_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698