Languages

Menu
Sites
Language
AudioBufferSourceNode::noteOff() throwing InvalidStateError

Hello,

I'm testing an existing HTML5 application on Tizen and running into an issue where stopping WebAudio sounds that have already completed throws an exception, something that doesn't happen on any standalone browser I've encountered.

The easiest way to replicate the problem is to download the source code for the recent WebAudio blog, here:

    https://developer.tizen.org/documentation/working-web-audio-api

and modify the check on line 252 of main.js to test for FINISHED_STATE in addition to the existing PLAYING_STATE.

There's no suggestion in the early WebAudio spec that Tizen 2.0 is working against that an error should be thrown here, and in later versions of the spec it's made quite clear that it should always be safe to call noteOff()/stop() after a noteOn()/play().

Has anybody else run into this issue? The obvious workaround is to add a test in my code so that noteOff() is not called for a completed sound, but this is still an area where Tizen seems to implement behaviour contradictory both to spec (at least more recent ones) and other browsers.

Grateful for any thoughts,

Zell

 

Edited by: Brock Boland on 17 Mar, 2014 Reason: Paragraph tags added automatically from tizen_format_fix module.

Responses

1 Replies
Lakshmi Grandhi
Hi Zell, Can you provide more details how to reproduce this bug, i changed state to FINISHED_STATE, i didn't receive exception.