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

Increase audio buffer size to 32768 samples (1024 ms) #10738

Closed

Conversation

Pokechu22
Copy link
Contributor

This fixes missing audio in various Datel titles; see https://bugs.dolphin-emu.org/issues/12281. They send a large number of samples at the same time, since they don't have to deal with an actual DSP program generating them.

It also fixes a crash when dumping audio on the Wii-compatible action replay, caused by an out-of-bounds array access in WaveFile. There was bounds-checking, but the bounds checking doubled the buffer size for the number of samples, when it should have doubled the sample count (I've changed it so that the actual buffer is twice as large, and the constant indicates the sample count, though). Also, that bounds checking logged a message and then proceeded to clobber memory regardless (it now returns without writing anything). After clobbering dolphin would show this and then crash since basename got overwritten.

This PR does fix datel titles, but it seems to introduce other issues (in particular, audio gets desynced after holding tab to disable the speed limit - this may be fixable though). I'm also not sure if this buffer has any meaning on real hardware (its size was last bumped in #3200 from 2048 samples to 4096 samples). Also, on datel titles, sometimes sound effects get played twice; I don't know what causes this (nor is it something that happens all of the time).

@Pokechu22
Copy link
Contributor Author

I've got a better implementation in mind that shouldn't have negative side-effects, so I'm closing this PR.

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