- s = getenv("QUAKE_SOUND_CHANNELS");
- if (s)
- shm->channels = atoi(s);
- else if ((i = COM_CheckParm("-sndmono")) != 0)
- shm->channels = 1;
- else if ((i = COM_CheckParm("-sndstereo")) != 0)
- shm->channels = 2;
- else
- shm->channels = 2;
-
- shm->samples = info.fragstotal * info.fragsize / (shm->samplebits/8);
- shm->submission_chunk = 1;
-
- // memory map the dma buffer
- shm->buffer = (unsigned char *) mmap(NULL, info.fragstotal
- * info.fragsize, PROT_READ|PROT_WRITE, MAP_FILE|MAP_SHARED, audio_fd, 0);
- if (!shm->buffer || shm->buffer == (unsigned char *)-1)