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

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

Issue 912803005: Looping AudioBufferSourceNodes stop only if duration is explicitly given. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Update according to review. Created 5 years, 10 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: Source/modules/webaudio/AudioBufferSourceNode.h
diff --git a/Source/modules/webaudio/AudioBufferSourceNode.h b/Source/modules/webaudio/AudioBufferSourceNode.h
index e9990694824f186f4cc55f08f7f6236b007d87d7..1f53b2a2c02521ce01e47fcaef4e4fc0a8235ee8 100644
--- a/Source/modules/webaudio/AudioBufferSourceNode.h
+++ b/Source/modules/webaudio/AudioBufferSourceNode.h
@@ -98,6 +98,8 @@ public:
private:
AudioBufferSourceNode(AudioContext*, float sampleRate);
+ void startSource(double when, double grainOffset, double grainDuration, bool isDurationGiven, ExceptionState&);
+
// Returns true on success.
bool renderFromBuffer(AudioBus*, unsigned destinationFrameOffset, size_t numberOfFrames);
@@ -132,7 +134,8 @@ private:
bool m_isGrain;
double m_grainOffset; // in seconds
double m_grainDuration; // in seconds
-
+ // True if grainDuration is given explicitly (via 3 arg start method).
+ bool m_isDurationGiven;
// totalPitchRate() returns the instantaneous pitch rate (non-time preserving).
// It incorporates the base pitch rate, any sample-rate conversion factor from the buffer, and any doppler shift from an associated panner node.
double totalPitchRate();
« no previous file with comments | « ManualTests/webaudio/audiobuffersource-loop-grain-no-duration.html ('k') | Source/modules/webaudio/AudioBufferSourceNode.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698