aboutsummaryrefslogtreecommitdiff
path: root/source/soundux.cpp
AgeCommit message (Collapse)Author
2013-02-03Synchronise the controller status more spread out inside a rendered frame:Nebuleon Fumika
* before rendering a background; * before rendering sprites; * while rendering more than 128 samples of audio at once ("Prefer fluid video"); * after every 16 scanlines of CPU execution instead of every 1; * while waiting for an audio buffer to become available; * while killing time between frames with fast-forward disabled. Controller presses and releases are now combined in a DS button bitfield using a shorter 32-bit algorithm. See entry.cpp:NDSSFCAccumulateJoypad and #define ACCUMULATE_JOYPAD in the source. This is still not suitable for playing platformers frame-perfectly, but it's much better than half a second of latency to press or release a button, and one still needs to press buttons a bit more than just light taps. I'd say 50 milliseconds is the latency now. Platformers requiring more precision can be played with frameskip 0. DMA does not require double-buffered displaying, so synchronise the controller more often by disabling double-buffered displaying again.
2013-02-01Revert the reversed stereo mixing loop. This makes it more consistent with ↵Nebuleon Fumika
mainline Snes9x, in case of merges from 1.53. It also didn't help much, given that the problem was trying to push 92 milliseconds of audio inside 20 milliseconds of time. This reverts commit 2b715684087675747df7cb8995695936f20c782b.
2013-01-27Assign a filter-related variable right after other filter-related variables.Nebuleon Fumika
2013-01-268 is NUM_CHANNELS. (magic constant)Nebuleon Fumika
2013-01-26Fix uninitialised memory access in pitch modulation.Nebuleon Fumika
2013-01-26Reverse the loop in MixStereo such that instead of "for each channel, for ↵Nebuleon Fumika
each playback sample, add into the mix buffer", the playback sample is instead written to the mix buffer only when fully mixed from the 8 SNES sound channels. Verified working with Secret of Mana, Super Bomberman 5 and Super Mario World.
2013-01-23Slight change to soundux.cpp.Nebuleon Fumika
2013-01-12soundux.cpp: Inline MixStereo (into S9xMixSamples).Nebuleon Fumika
2013-01-12Revert "Remove shifted envelope heights from the code, because one is always ↵Nebuleon Fumika
set from the other and the shifted height is not used in saved states." This reverts commit e3bb4a5f62ab6b38eb1a58e700b7d713b4e397b0.
2013-01-12Remove redundant writes to support reverse stereo. Define ↵Nebuleon Fumika
FOREVER_FORWARD_STEREO.
2013-01-12Remove shifted envelope heights from the code, because one is always set ↵Nebuleon Fumika
from the other and the shifted height is not used in saved states.
2013-01-12More efficient noise generation taken from blargg's code in Snes9x 1.53.Nebuleon Fumika
2013-01-11Reduce memory access in noise generation.Nebuleon Fumika
2013-01-11Prepare for audio optimisations. Fix the indentation in MixStereo().Nebuleon Fumika
2013-01-11Stop constantly testing for 16-bit and stereo in sound handlers. Define ↵Nebuleon Fumika
FOREVER_16_BIT_SOUND and FOREVER_STEREO and use them throughout the code. This is essentially commit 6b36e79013d4c9273a96a9783a2bccdb516f174a, but for sound instead of graphics.
2011-03-05first commitKitty Draper