quick and dirty attempt to prevent reading and writing from/to the same

audio buffer
This commit is contained in:
Daryl Borth 2018-08-23 10:27:26 -06:00
parent 3d298ff126
commit 6a045e6441
2 changed files with 14 additions and 1 deletions

View File

@ -15,7 +15,7 @@ Wii homebrew is WiiBrew (www.wiibrew.org).
| FEATURES | | FEATURES |
•˜———–—––-- - —————————––––– ———–—––-- - —————————––––– ———–—––-- - ————————• •˜———–—––-- - —————————––––– ———–—––-- - —————————––––– ———–—––-- - ————————•
* Based on hybrid Snes9x 1.51 and 1.56 (with faster Blargg S-SMP module) * Based on Snes9x 1.52
* Wiimote, Nunchuk, Classic, and Gamecube controller support * Wiimote, Nunchuk, Classic, and Gamecube controller support
* SNES Superscope, Mouse, Justifier support * SNES Superscope, Mouse, Justifier support
* Cheat support * Cheat support
@ -33,6 +33,14 @@ Wii homebrew is WiiBrew (www.wiibrew.org).
| UPDATE HISTORY | | UPDATE HISTORY |
•˜———–—––-- - —————————––––– ———–—––-- - —————————––––– ———–—––-- - ————————• •˜———–—––-- - —————————––––– ———–—––-- - —————————––––– ———–—––-- - ————————•
[4.3.9]
* Revert core completely back to Snes9x 1.52 to fix some games
* Rewritten audio handling
* Fix tinny audio issue when going from the game to the menu and back
* Fixed random in-game crashes
* Fixed sound issues from turbo mode
[4.3.8 - August 16, 2018] [4.3.8 - August 16, 2018]
* Partially update core to 1.56 (with less accurate but faster Blargg audio core) * Partially update core to 1.56 (with less accurate but faster Blargg audio core)

View File

@ -82,6 +82,11 @@ static void S9xAudioCallback (void *data) {
updateUnplayed(1); updateUnplayed(1);
nextab = (nextab + 1) % BUFFERCOUNT; nextab = (nextab + 1) % BUFFERCOUNT;
if(!Settings.TurboMode && ((nextab + 1) % BUFFERCOUNT) == playab) {
// quick and dirty attempt to prevent reading and writing from/to the same buffer
nextab = (nextab + BUFFERCOUNT/2) % BUFFERCOUNT;
}
if(playab == -1) { if(playab == -1) {
if(unplayed > 2) { if(unplayed > 2) {
playab = 0; playab = 0;