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

Audio on Linux has some problem. Also, SDL2 audio APIs are deprecated. #13

Open
AndreaOrru opened this issue Dec 7, 2015 · 9 comments
Labels

Comments

@AndreaOrru
Copy link
Owner

No description provided.

@kraln
Copy link
Contributor

kraln commented Nov 29, 2016

Is the problem "Extreme choppyness?" if so, I am experiencing this and will investigate.

@AndreaOrru
Copy link
Owner Author

AndreaOrru commented Nov 29, 2016

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.

@AndreaOrru AndreaOrru added the bug label Nov 29, 2016
@AndreaOrru
Copy link
Owner Author

621aa65 should solve this. Hopefully it doesn't break on Mac.

@kraln
Copy link
Contributor

kraln commented Dec 2, 2016

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

@AndreaOrru
Copy link
Owner Author

AndreaOrru commented Dec 2, 2016

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. :)

@AndreaOrru AndreaOrru reopened this Dec 2, 2016
@kraln
Copy link
Contributor

kraln commented Dec 5, 2016

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

@AndreaOrru
Copy link
Owner Author

AndreaOrru commented Dec 5, 2016

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. :)

@RyanPattison
Copy link

In Ubuntu, entering export SDL_AUDIODRIVER=ALSA before running improves the audio by a lot.

@AndreaOrru
Copy link
Owner Author

Thanks, that's good to know! I'll write that in the README.

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

No branches or pull requests

3 participants