- 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)
- {
- perror("/dev/dsp");
- Con_Printf("Could not mmap /dev/dsp\n");
- close(audio_fd);
- return 0;
- }
-
- tmp = 0;
- if (shm->channels == 2)
- tmp = 1;
+ shm->format.channels = 1;
+// COMMANDLINEOPTION: Linux OSS Sound: -sndstereo sets sound output to stereo
+ else // if ((i = COM_CheckParm("-sndstereo")) != 0)
+ shm->format.channels = 2;