I am dynamically creating a audio file and changing the source on the fly. However after i change the src and try to change the currentTime i always get a Invalid state error. H
You are not passing a function reference to your addEventListener - you are calling the function inline. The doneLoading() function executes immediately (before the file has loaded) and the browser correctly throws an INVALID_STATE_ERR:
this.mAudioPlayer.addEventListener('canplaythrough', this.doneLoading(aTime), false );
Try passing in a function reference instead. Like this:
this.mAudioPlayer.addEventListener('loadedmetadata',function(){
this.currentTime = aTime / 1000.0;
}, false );