The situation is somewhat like-
var someVar = some_other_function();
someObj.addEventListener(\"click\", function(){
some_function(someVar);
}, false);
<
You can add and remove eventlisteners with arguments by declaring a function as a variable.
myaudio.addEventListener('ended',funcName=function(){newSrc(myaudio)},false);
newSrc
is the method with myaudio as parameter
funcName
is the function name variable
You can remove the listener with
myaudio.removeEventListener('ended',func,false);