Relative Content

Tag Archive for reactjsaudioarraybufferaudiobuffer

Checking if AudioBufferSourceNode has already started

My problem lies in a series of audiobuffersource calls and starting. I have successfully implemented pauses in the middle of an audioBuffer by stopping the audioNode and calculating the elapsedTime to start the audioBuffer again. That works just fine. The bug is where it moves from playing the current one to the next one, and it takes time (although very minimal) to start a completely new audioBuffer. When I call my pause() consecutively in a very short span of time it has this exception: speakCharacter.ts?8d1c:345 Uncaught (in promise) DOMException: Failed to execute 'stop' on 'AudioScheduledSourceNode': cannot call stop without calling start first.