Indentation fixes in sdl-sound.cpp.
This commit is contained in:
parent
9fc0237a01
commit
69ed92eada
|
@ -51,26 +51,26 @@ fillaudio(void *udata,
|
||||||
int len)
|
int len)
|
||||||
{
|
{
|
||||||
char bufStarveDetected = 0;
|
char bufStarveDetected = 0;
|
||||||
static int16_t sample = 0;
|
static int16_t sample = 0;
|
||||||
int16 *tmps = (int16*)stream;
|
int16 *tmps = (int16*)stream;
|
||||||
len >>= 1;
|
len >>= 1;
|
||||||
while (len)
|
while (len)
|
||||||
{
|
{
|
||||||
//int16 sample = 0;
|
//int16 sample = 0;
|
||||||
if (s_BufferIn)
|
if (s_BufferIn)
|
||||||
{
|
{
|
||||||
sample = s_Buffer[s_BufferRead];
|
sample = s_Buffer[s_BufferRead];
|
||||||
s_BufferRead = (s_BufferRead + 1) % s_BufferSize;
|
s_BufferRead = (s_BufferRead + 1) % s_BufferSize;
|
||||||
s_BufferIn--;
|
s_BufferIn--;
|
||||||
} else {
|
} else {
|
||||||
// Retain last known sample value, helps avoid clicking
|
// Retain last known sample value, helps avoid clicking
|
||||||
// noise when sound system is starved of audio data.
|
// noise when sound system is starved of audio data.
|
||||||
//sample = 0;
|
//sample = 0;
|
||||||
bufStarveDetected = 1;
|
bufStarveDetected = 1;
|
||||||
nes_shm->sndBuf.starveCounter++;
|
nes_shm->sndBuf.starveCounter++;
|
||||||
}
|
}
|
||||||
|
|
||||||
nes_shm->push_sound_sample( sample );
|
nes_shm->push_sound_sample( sample );
|
||||||
|
|
||||||
*tmps = sample;
|
*tmps = sample;
|
||||||
tmps++;
|
tmps++;
|
||||||
|
@ -194,7 +194,7 @@ WriteSound(int32 *buf,
|
||||||
{
|
{
|
||||||
extern int EmulationPaused;
|
extern int EmulationPaused;
|
||||||
if (EmulationPaused == 0)
|
if (EmulationPaused == 0)
|
||||||
{
|
{
|
||||||
int waitCount = 0;
|
int waitCount = 0;
|
||||||
|
|
||||||
while(Count)
|
while(Count)
|
||||||
|
@ -220,7 +220,7 @@ WriteSound(int32 *buf,
|
||||||
|
|
||||||
buf++;
|
buf++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in New Issue