Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

playback finish is not handled properly #4

Open
jussi-kalliokoski opened this issue Nov 20, 2011 · 3 comments
Open

playback finish is not handled properly #4

jussi-kalliokoski opened this issue Nov 20, 2011 · 3 comments

Comments

@jussi-kalliokoski
Copy link
Member

when a file's end is reached, jsmad throws

Uncaught Header decoding failed
Mad.Frame.decodeframe.js:366
refillplayer.js:62
(anonymous function)player.js:92
AUDIOLIB.SinkClass.processaudiolib.js:2550
bufferFill

then it starts throwing

Uncaught TypeError: Cannot read property 'flags' of null
Mad.Frame.decodeframe.js:362
refillplayer.js:62
(anonymous function)player.js:92
AUDIOLIB.SinkClass.processaudiolib.js:2550
bufferFill
@nddrylliog
Copy link
Contributor

@jussi-kalliokoski How do you plan to fix that?

@jussi-kalliokoski
Copy link
Member Author

I'm not sure yet, I was thinking of adding another check to see if we actually have a frame and a header, but maybe jsmad should let the developer know of the stream end somehow... A callback? Trigger stop? Imho, it would be best to do both, but can I tell if it's just buffering or if the stream really ended? Does stream have information on whether it's ended?

@nddrylliog
Copy link
Contributor

@jussi-kalliokoski imho, the underlying I/O layer should let jsmad know whether it just ran out of buffer or that it reached the end of the stream. jsmad could then let devs know through callbacks, that's a good idea yes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants