]> de.git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - snd_oss.c
implemented 7.1 audio, only works with SDL (attempted ALSA support but ALSA doesn...
[xonotic/darkplaces.git] / snd_oss.c
index eef8e62c9681a851357b69ec8ddba4e79e3b7ee4..b1503200b38221c84ecc082fe8ced46c6bf0aa0e 100644 (file)
--- a/snd_oss.c
+++ b/snd_oss.c
@@ -189,7 +189,8 @@ qboolean SNDDMA_Init(void)
                return 0;
        }
 
-       shm->samples = info.fragstotal * info.fragsize / shm->format.width;
+       shm->sampleframes = info.fragstotal * info.fragsize / shm->format.width / shm->format.channels;
+       shm->samples = shm->sampleframes * shm->format.channels;
 
        // memory map the dma buffer
        shm->bufferlength = info.fragstotal * info.fragsize;