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

Unified Diff: third_party/WebKit/Source/modules/webaudio/AbstractAudioContext.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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/modules/webaudio/AbstractAudioContext.h
diff --git a/third_party/WebKit/Source/modules/webaudio/AbstractAudioContext.h b/third_party/WebKit/Source/modules/webaudio/AbstractAudioContext.h
index 942b7ff67613c808866669403c498570b0da65a9..d082cebcd0024d9051017923fcbed87a638e808a 100644
--- a/third_party/WebKit/Source/modules/webaudio/AbstractAudioContext.h
+++ b/third_party/WebKit/Source/modules/webaudio/AbstractAudioContext.h
@@ -204,7 +204,7 @@ public:
void notifySourceNodeFinishedProcessing(AudioHandler*);
// Called at the start of each render quantum.
- void handlePreRenderTasks();
+ void handlePreRenderTasks(const WebAudioTimestamp&);
// Called at the end of each render quantum.
void handlePostRenderTasks();
@@ -267,6 +267,9 @@ public:
// a histogram.
void recordUserGestureState();
+ // Gets the audio timestamp of the currently audiable signal.
+ virtual void getOutputTimestamp(AudioTimestamp&) {}
+
protected:
explicit AbstractAudioContext(Document*);
AbstractAudioContext(Document*, unsigned numberOfChannels, size_t numberOfFrames, float sampleRate);
@@ -296,6 +299,8 @@ protected:
void rejectPendingDecodeAudioDataResolvers();
+ WebAudioTimestamp outputTimestamp();
+
private:
bool m_isCleared;
void clear();
@@ -375,6 +380,9 @@ private:
// This is considering 32 is large enough for multiple channels audio.
// It is somewhat arbitrary and could be increased if necessary.
enum { MaxNumberOfChannels = 32 };
+
+ // Output audio stream timestamp.
+ WebAudioTimestamp m_outputTimestamp;
};
} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698