Hacker News new | past | comments | ask | show | jobs | submit login

Nice explanation. I had some similar problems with my project found here: http://simulationcorner.net/Sidplayer/index.html

In the end I had to use the queuing of AudioBufferSourceNodes as explained. In Chrome I could use the loop function and refill the loop buffer myself with a timer. Unfortunately this didn't work under Firefox.

A worker thread for the whole emulation might indeed help, but you have to copy the buffer via messages to the master, which also produces a lot of timing problems. Additional, copying the whole screen buffer with 25fps slows everything down.




Transferable buffers solve the copying issue, but I don't know if they are usable for your scenario yet.


Thanks, found a helpful link: http://stackoverflow.com/questions/16071211/using-transferab...

Is this a standard, that you can share a buffer? Will it work in all browsers?


I don't know if it's fully standardized or works everywhere, but it's at the very least in the standardization progress. I'm pretty sure at least two browsers implement it.




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: