LaiNES
LaiNES copied to clipboard
Audio on Linux has some problem. Also, SDL2 audio APIs are deprecated.
Is the problem "Extreme choppyness?" if so, I am experiencing this and will investigate.
It is. I just switched back to Linux actually, so I can have a look too. I have plans to rewrite the APU core to be independent from blargg's libraries anyway.
621aa65858ec6eaae33f051cd0041e4d95df9354 should solve this. Hopefully it doesn't break on Mac.
Issue still present on my machine: Linux galium 4.8.3-1-ARCH #1 SMP PREEMPT Thu Oct 20 19:53:59 CEST 2016 x86_64 GNU/Linux
Compiler: clang version 3.8.1 (tags/RELEASE_381/final)
Computer: Thinkpad L460
Here's a .FLAC -- you can see the audio output is really choppy. test.zip
Ok. It solved it on mine. I'll borrow another Linux machine and experiment more.
I started sketching the new APU core anyway. If this is a quick fix then it's great, otherwise I'd rather focus on the rewrite. :)
I started to poke around a bit. When I run the APU for twice as many cycles, it seems to be better. When I run it at a lower sample rate (= lowpass filter), it seems to be much better.
https://github.com/kraln/LaiNES/tree/investigating_audio
Thanks.
What I find weird is that it works flawlessly on Mac OS X. Could that be because of a better sampling engine or something like that?
I won't have a lot of time to work on this till at least the 21st of December. Your contributions are super appreciated. :)
In Ubuntu, entering export SDL_AUDIODRIVER=ALSA
before running improves the audio by a lot.
Thanks, that's good to know! I'll write that in the README.