sms wip: random tweaks, refactoring (palette, sound stuff, etc)

git-svn-id: file:///home/notaz/opt/svn/PicoDrive@764 be3aeb3a-fb24-0410-a615-afba39da0efa
This commit is contained in:
notaz 2009-08-28 20:16:33 +00:00
parent 460603fa81
commit 19954be196
13 changed files with 168 additions and 136 deletions

View file

@ -398,7 +398,6 @@ PICO_INTERNAL void PsndGetSamples(int y)
PICO_INTERNAL void PsndGetSamplesMS(void)
{
int *buf32 = PsndBuffer;
int stereo = (PicoOpt & 8) >> 3;
int length = PsndLen;
@ -415,8 +414,12 @@ PICO_INTERNAL void PsndGetSamplesMS(void)
if (PicoOpt & POPT_EN_PSG)
SN76496Update(PsndOut, length, stereo);
// convert + limit to normal 16bit output
PsndMix_32_to_16l(PsndOut, buf32, length);
// upmix to "stereo" if needed
if (stereo) {
int i = length, *p = (void *)PsndOut;
while (i--)
*p |= *p << 16;
}
if (PicoWriteSound != NULL)
PicoWriteSound(length);