From 2adf24bbf23c144f2446816cc70910262bb4b5da Mon Sep 17 00:00:00 2001 From: "N.N." Date: Thu, 28 May 2009 01:30:22 +0000 Subject: reformat (rename variables) svn path=/trunk/; revision=11539 --- desiredata/src/s_audio_alsamm.c | 112 +++++++++++++++++++--------------------- 1 file changed, 53 insertions(+), 59 deletions(-) (limited to 'desiredata/src/s_audio_alsamm.c') diff --git a/desiredata/src/s_audio_alsamm.c b/desiredata/src/s_audio_alsamm.c index 3a57691d..5ee76e3d 100644 --- a/desiredata/src/s_audio_alsamm.c +++ b/desiredata/src/s_audio_alsamm.c @@ -146,8 +146,8 @@ int alsamm_open_audio(int rate) { /* first have a look which cards we can get and set up device infos for them */ /* init some structures */ for(int i=0; ia_handle); if (err<0) {check_error(err,"outcard prepare error for playback"); return;} @@ -436,9 +435,9 @@ static void alsamm_start() { err = snd_pcm_start (dev->a_handle); if (err<0) check_error(err,"could not start playback"); } - for (int devno=0; devnoa_synced == 0) { err = snd_pcm_prepare (dev->a_handle); @@ -467,14 +466,12 @@ static void alsamm_start() { } static void alsamm_stop() { - for (int devno=0; devnoa_handle)); } - for (int devno=0; devnoa_handle)); } if (debug) show_availist(); @@ -529,8 +526,8 @@ int alsamm_send_dacs() { so we don't make a precheck of insamples here and let outsample check be the first of the first card. */ /* OUTPUT Transfer */ fpo = sys_soundout; - for(devno = 0;devno < alsa_noutdev;devno++) { - t_alsa_dev *dev = &alsa_outdev[devno]; + for(devno = 0;devno < alsao.ndev;devno++) { + t_alsa_dev *dev = &alsao.dev[devno]; snd_pcm_t *out = dev->a_handle; int ochannels =dev->a_channels; /* how much samples available ??? */ @@ -603,17 +600,14 @@ int alsamm_send_dacs() { fpo += ochannels*sys_dacblocksize; }/* for devno */ fpi = sys_soundin; /* star first card first channel */ - for(devno = 0;devno < alsa_nindev;devno++) { - t_alsa_dev *dev = &alsa_indev[devno]; + for(devno = 0;devno < alsai.ndev;devno++) { + t_alsa_dev *dev = &alsai.dev[devno]; snd_pcm_t *in = dev->a_handle; int ichannels = dev->a_channels; iavail = snd_pcm_avail_update(in); if (iavail < 0) { err = xrun_recovery(in, iavail); - if (err < 0) { - check_error(err,"input avail update failed"); - return SENDDACS_NO; - } + if (err < 0) {check_error(err,"input avail update failed"); return SENDDACS_NO;} iavail=snd_pcm_avail_update(in); } state = snd_pcm_state(in); @@ -664,7 +658,7 @@ int alsamm_send_dacs() { size -= iframes; } fpi += ichannels*sys_dacblocksize; - } /* for out devno < alsamm_outcards*/ + } /* for out devno < alsamm_outcards */ if ((timenow = sys_getrealtime()) > (timelast + sleep_time)) { if(debug && dac_send < 10 && sys_verbose) post("slept %f > %f + %f (=%f)", timenow,timelast,sleep_time,(timelast + sleep_time)); -- cgit v1.2.1