mirror of
https://github.com/RaySollium99/picodrive.git
synced 2025-09-05 07:17:45 -04:00
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:
parent
460603fa81
commit
19954be196
13 changed files with 168 additions and 136 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue