diff options
Diffstat (limited to 'pd/src/s_audio_alsamm.c')
-rw-r--r-- | pd/src/s_audio_alsamm.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/pd/src/s_audio_alsamm.c b/pd/src/s_audio_alsamm.c index 0378c4b4..33c44755 100644 --- a/pd/src/s_audio_alsamm.c +++ b/pd/src/s_audio_alsamm.c @@ -218,6 +218,8 @@ int alsamm_open_audio(int rate) alsa_indev[i].a_synced=alsa_outdev[i].a_synced=0; alsa_indev[i].a_channels=alsa_outdev[i].a_channels=0; } + alsamm_inchannels = 0; + alsamm_outchannels = 0; /* opening alsa debug channel */ err = snd_output_stdio_attach(&alsa_stdout, stdout, 0); @@ -251,8 +253,6 @@ int alsamm_open_audio(int rate) for(i=0;i<alsa_noutdev;i++) { - - /* post("open audio out %d, of %lx, %d",i,&alsa_device[i], alsa_outdev[i].a_handle); */ if((err = set_hwparams(alsa_outdev[i].a_handle, hw_params, @@ -357,6 +357,8 @@ int alsamm_open_audio(int rate) fflush(stdout); #endif + sys_setchsr(alsamm_inchannels, alsamm_outchannels, alsamm_sr); + alsamm_start(); /* report success */ @@ -773,9 +775,9 @@ static int set_swparams(snd_pcm_t *handle, snd_pcm_sw_params_t *swparams, int pl #ifdef ALSAMM_DEBUG if(sys_verbose) post("set sw finished"); +#endif #else post("alsa: need version 1.0 or above for mmap operation"); -#endif #endif /* ALSAAPI9 */ return 0; } |