Log In  

Aside of stuff like "it's alpha"? Is it something browser-side that can't be fixed or do you think audio choppiness can be eradicated?

P#14383 2015-09-19 20:53 ( Edited 2015-10-06 05:28)

The web audio api can easily provide flawless dynamically generated audio, otherwise it would be a terrible standard with no real point. Whatever the issue is it can be fixed.

P#14396 2015-09-20 00:34 ( Edited 2015-09-20 04:34)

I've never experienced choppy audio playback ... maybe it's a matter of cpu performance.

P#14401 2015-09-20 06:35 ( Edited 2015-09-20 10:35)

pico-8 uses per-frame deterministic emulation.
This means that another "frame-worth" of audio is being generated on each frame together with drawing imagery on screen.
If the frame takes longer-than-needed to process, the browser will "run out" of audio to play before, resulting in a "chop" (silence before the frame).
Aside of not making the emulator lag, you can't do much about this.

P#14402 2015-09-20 07:21 ( Edited 2015-09-20 11:21)

Maybe it would be good if webplayer would "render" all sounds upon cartridge's boot? That way it could play sound flawlessly.

P#14407 2015-09-20 08:39 ( Edited 2015-09-20 12:39)

Unfortunately there's no way in javascript (asm.js) to guarantee the mixing callback is called in time to avoid starving the audio stream, so the best things to do is just to use a large buffer, request a high event rate, and try to keep maximum mainloop execution time down.

I didn't realise the sound was choppy on some systems -- is there anyone else having this issue? If so, please take the time to comment with your system specs and browser version.

The code I'm using went through a number of iterations of QA at Mozilla while I was doing a demo of Voxatron for the Firefox default page, so I fear it can't be improved much for now! But it would be great to get some more data on the problem, even if anecdotal.

@darkhog -- is the choppy sound constantly bad? or just an occasional skipped 1/10th of a second?

pre-mixing sounds is a possibility, but sounds gets pretty large with music, and I don't want to lose the ability to dynamically generate audio during cart execution.

P#14419 2015-09-20 13:14 ( Edited 2015-09-20 17:14)

How come there's no sound in Safari?

P#14423 2015-09-20 13:42 ( Edited 2015-09-20 17:42)

" @darkhog -- is the choppy sound constantly bad? or just an occasional skipped 1/10th of a second?"

Sometimes it's skip, sometimes it is consistently bad. My specs:

Intel Core2Quad Q9450 @2.66GHz
GeForce GTX660
Windows 7 Ultimate x64
Firefox 40.0.3

One thing to note is that I usually have quite few tabs open in FF. Like 10-20

P#14426 2015-09-20 14:03 ( Edited 2015-09-20 18:03)

For me, I've noticed that it's a little choppy in Chrome, but always fine in FireFox.

With that said, it was choppy in FireFox until I installed the latest Realtek audio drivers.

P#15022 2015-10-06 01:28 ( Edited 2015-10-06 05:28)

[Please log in to post a comment]

Follow Lexaloffle:          
Generated 2023-03-20 13:01:35 | 0.008s | Q:21