Lines Matching refs:hw

48     HWVoiceOut hw;
54 HWVoiceIn hw;
702 static int alsa_run_out (HWVoiceOut *hw)
704 ALSAVoiceOut *alsa = (ALSAVoiceOut *) hw;
711 live = audio_pcm_hw_get_live_out (hw);
724 rpos = hw->rpos;
726 int left_till_end_samples = hw->samples - rpos;
730 src = hw->mix_buf + rpos;
731 dst = advance (alsa->pcm_buf, rpos << hw->info.shift);
733 hw->clip (dst, src, len);
783 rpos = (rpos + written) % hw->samples;
786 dst = advance (dst, written << hw->info.shift);
792 hw->rpos = rpos;
796 static void alsa_fini_out (HWVoiceOut *hw)
798 ALSAVoiceOut *alsa = (ALSAVoiceOut *) hw;
809 static int alsa_init_out (HWVoiceOut *hw, audsettings_t *as)
811 ALSAVoiceOut *alsa = (ALSAVoiceOut *) hw;
841 audio_pcm_init_info (&hw->info, &obt_as);
842 hw->samples = obt.samples;
844 alsa->pcm_buf = audio_calloc (AUDIO_FUNC, obt.samples, 1 << hw->info.shift);
847 hw->samples, 1 << hw->info.shift);
878 static int alsa_ctl_out (HWVoiceOut *hw, int cmd, ...)
880 ALSAVoiceOut *alsa = (ALSAVoiceOut *) hw;
895 static int alsa_init_in (HWVoiceIn *hw, audsettings_t *as)
897 ALSAVoiceIn *alsa = (ALSAVoiceIn *) hw;
927 audio_pcm_init_info (&hw->info, &obt_as);
928 hw->samples = obt.samples;
930 alsa->pcm_buf = audio_calloc (AUDIO_FUNC, hw->samples, 1 << hw->info.shift);
933 hw->samples, 1 << hw->info.shift);
942 static void alsa_fini_in (HWVoiceIn *hw)
944 ALSAVoiceIn *alsa = (ALSAVoiceIn *) hw;
954 static int alsa_run_in (HWVoiceIn *hw)
956 ALSAVoiceIn *alsa = (ALSAVoiceIn *) hw;
957 int hwshift = hw->info.shift;
959 int live = audio_pcm_hw_get_live_in (hw);
960 int dead = hw->samples - live;
970 bufs[0].add = hw->wpos;
990 avail = hw->samples;
1019 if (hw->wpos + decr > hw->samples) {
1020 bufs[0].len = (hw->samples - hw->wpos);
1021 bufs[1].len = (decr - (hw->samples - hw->wpos));
1036 dst = hw->conv_buf + bufs[i].add;
1073 hw->conv (dst, src, nread, &nominal_volume);
1084 hw->wpos = (hw->wpos + read_samples) % hw->samples;
1093 static int alsa_ctl_in (HWVoiceIn *hw, int cmd, ...)
1095 ALSAVoiceIn *alsa = (ALSAVoiceIn *) hw;