Hello.

This patch adds support for calling the SNDCTL_DSP_CHANNELS ioctl on /dev/dsp.
The changelog is

2004-03-31 Fabrizio Gennari ([EMAIL PROTECTED])
- fhandler_dsp.cc(fhandler_dev_dsp::ioctl): add support for SNDCTL_DSP_CHANNELS
ioctl

It is almost a copy-and-paste from SNDCTL_DSP_STEREO

Bye
Fabrizio

__________________________________________________________________
ADSL Senza Canone 640Kbps:
attivala entro il 31 marzo e avrai GRATIS il costo di adesione,
quello di attivazione e il modem per tutto il 2004.
E per i primi 3 mesi navighi a 1,5 euro l'ora! Affrettati!
http://point.tiscali.it/adsl/prodotti/senzacanone/



--- fhandler_dsp_old.cc 2003-11-26 03:15:07.001000000 +0100
+++ fhandler_dsp.cc     2004-03-12 10:11:50.830185600 +0100
@@ -591,6 +591,24 @@
       }
       break;
 
+      CASE (SNDCTL_DSP_CHANNELS)
+      {
+       int nChannels = *intptr;
+
+       s_audio->close ();
+       if (s_audio->open (audiofreq_, audiobits_, nChannels) == true)
+         {
+           audiochannels_ = nChannels;
+           return 0;
+         }
+       else
+         {
+           s_audio->open (audiofreq_, audiobits_, audiochannels_);
+           return -1;
+         }
+      }
+      break;
+
       CASE (SNDCTL_DSP_GETOSPACE)
       {
        audio_buf_info *p = (audio_buf_info *) ptr;

Reply via email to