aboutsummaryrefslogtreecommitdiff
path: root/pd/src/s_audio_alsamm.c
diff options
context:
space:
mode:
authorMiller Puckette <millerpuckette@users.sourceforge.net>2006-08-15 04:54:15 +0000
committerMiller Puckette <millerpuckette@users.sourceforge.net>2006-08-15 04:54:15 +0000
commit067d2611b9e1041318f605091dc6e93936fa9ce5 (patch)
treedba59fccb6d070232ff0e17dbbdf1cefe752647f /pd/src/s_audio_alsamm.c
parent7c232a7d3a14391fd4d4f58892cf89e294c87d62 (diff)
0.40 test 01 commit ... although the "about" dialog thinks it's test02 :)
svn path=/trunk/; revision=5604
Diffstat (limited to 'pd/src/s_audio_alsamm.c')
-rw-r--r--pd/src/s_audio_alsamm.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/pd/src/s_audio_alsamm.c b/pd/src/s_audio_alsamm.c
index 33c44755..66255932 100644
--- a/pd/src/s_audio_alsamm.c
+++ b/pd/src/s_audio_alsamm.c
@@ -216,7 +216,7 @@ int alsamm_open_audio(int rate)
/* init some structures */
for(i=0;i < ALSA_MAXDEV;i++){
alsa_indev[i].a_synced=alsa_outdev[i].a_synced=0;
- alsa_indev[i].a_channels=alsa_outdev[i].a_channels=0;
+ alsa_indev[i].a_channels=alsa_outdev[i].a_channels=-1; /* query defaults */
}
alsamm_inchannels = 0;
alsamm_outchannels = 0;
@@ -510,7 +510,7 @@ static int set_hwparams(snd_pcm_t *handle, snd_pcm_hw_params_t *params,int *chs)
if(sys_verbose)
post("Getting channels:min=%d, max= %d for request=%d",minchs,maxchs,channels);
#endif
-
+ if(channels < 0)channels=maxchs;
if(channels > maxchs)channels = maxchs;
if(channels < minchs)channels = minchs;