mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-11-26 22:31:05 +00:00
some sdl audio tweaks that made it work with artsc output
thought I commited these before.. (where have we heard that before?) ;)
This commit is contained in:
parent
eb95bcae84
commit
2e11cbb8a4
1 changed files with 3 additions and 3 deletions
|
@ -59,7 +59,7 @@ paint_audio (void *unused, Uint8 * stream, int len)
|
|||
samplesbytes = shm->samples * (shm->samplebits / 8);
|
||||
|
||||
shm->samplepos += streamsamples;
|
||||
if (shm->samplepos >= shm->samples)
|
||||
while (shm->samplepos >= shm->samples)
|
||||
shm->samplepos -= shm->samples;
|
||||
S_PaintChannels (soundtime + streamsamples);
|
||||
|
||||
|
@ -97,7 +97,7 @@ SNDDMA_Init (void)
|
|||
return 0;
|
||||
}
|
||||
desired.channels = 2;
|
||||
desired.samples = 512;
|
||||
desired.samples = 1024;
|
||||
desired.callback = paint_audio;
|
||||
|
||||
/* Open the audio device */
|
||||
|
@ -140,7 +140,7 @@ SNDDMA_Init (void)
|
|||
shm->samplebits = (obtained.format & 0xFF);
|
||||
shm->speed = obtained.freq;
|
||||
shm->channels = obtained.channels;
|
||||
shm->samples = obtained.samples * 4;
|
||||
shm->samples = obtained.samples * 16;
|
||||
shm->samplepos = 0;
|
||||
shm->submission_chunk = 1;
|
||||
shm->buffer = calloc(shm->samples * (shm->samplebits / 8), 1);
|
||||
|
|
Loading…
Reference in a new issue