• Home
  • Raw
  • Download

Lines Matching refs:hw

76     HWVoiceOut hw;  member
88 HWVoiceIn hw; member
352 static void dsound_write_sample (HWVoiceOut *hw, uint8_t *dst, int dst_len) in dsound_write_sample() argument
356 int pos = hw->rpos + dst_len; in dsound_write_sample()
357 struct st_sample *src1 = hw->mix_buf + hw->rpos; in dsound_write_sample()
360 if (pos > hw->samples) { in dsound_write_sample()
361 src_len1 = hw->samples - hw->rpos; in dsound_write_sample()
362 src2 = hw->mix_buf; in dsound_write_sample()
368 hw->clip (dst, src1, src_len1); in dsound_write_sample()
372 dst = advance (dst, src_len1 << hw->info.shift); in dsound_write_sample()
373 hw->clip (dst, src2, src_len2); in dsound_write_sample()
376 hw->rpos = pos % hw->samples; in dsound_write_sample()
379 static void dsound_clear_sample (HWVoiceOut *hw, LPDIRECTSOUNDBUFFER dsb) in dsound_clear_sample() argument
387 &hw->info, in dsound_clear_sample()
389 hw->samples << hw->info.shift, in dsound_clear_sample()
398 len1 = blen1 >> hw->info.shift; in dsound_clear_sample()
399 len2 = blen2 >> hw->info.shift; in dsound_clear_sample()
408 audio_pcm_info_clear_buf (&hw->info, p1, len1); in dsound_clear_sample()
412 audio_pcm_info_clear_buf (&hw->info, p2, len2); in dsound_clear_sample()
511 static int dsound_ctl_out (HWVoiceOut *hw, int cmd, ...) in dsound_ctl_out() argument
515 DSoundVoiceOut *ds = (DSoundVoiceOut *) hw; in dsound_ctl_out()
534 dsound_clear_sample (hw, dsb); in dsound_ctl_out()
568 static int dsound_run_out (HWVoiceOut *hw, int live) in dsound_run_out() argument
572 DSoundVoiceOut *ds = (DSoundVoiceOut *) hw; in dsound_run_out()
587 hwshift = hw->info.shift; in dsound_run_out()
588 bufsize = hw->samples << hwshift; in dsound_run_out()
610 millis_to_bytes (&hw->info, conf.latency_millis) - cur_blat; in dsound_run_out()
612 old_pos &= ~hw->info.align; in dsound_run_out()
631 ds->played += audio_ring_dist (ds->old_pos, ppos, hw->bufsize); in dsound_run_out()
651 len &= ~hw->info.align; in dsound_run_out()
661 &hw->info, in dsound_run_out()
677 dsound_write_sample (hw, p1, len1); in dsound_run_out()
681 dsound_write_sample (hw, p2, len2); in dsound_run_out()
694 abs (ds->mixed - ds->played) / (double) hw->info.bytes_per_second); in dsound_run_out()
699 static int dsound_ctl_in (HWVoiceIn *hw, int cmd, ...) in dsound_ctl_in() argument
703 DSoundVoiceIn *ds = (DSoundVoiceIn *) hw; in dsound_ctl_in()
756 static int dsound_run_in (HWVoiceIn *hw) in dsound_run_in() argument
760 DSoundVoiceIn *ds = (DSoundVoiceIn *) hw; in dsound_run_in()
775 hwshift = hw->info.shift; in dsound_run_in()
777 live = audio_pcm_hw_get_live_in (hw); in dsound_run_in()
778 dead = hw->samples - live; in dsound_run_in()
795 if (rpos & hw->info.align) { in dsound_run_in()
797 rpos, hw->info.align); in dsound_run_in()
799 hw->wpos = rpos >> hwshift; in dsound_run_in()
802 if (cpos & hw->info.align) { in dsound_run_in()
804 cpos, hw->info.align); in dsound_run_in()
808 len = audio_ring_dist (cpos, hw->wpos, hw->samples); in dsound_run_in()
816 &hw->info, in dsound_run_in()
817 hw->wpos << hwshift, in dsound_run_in()
834 hw->conv (hw->conv_buf + hw->wpos, p1, len1, &nominal_volume); in dsound_run_in()
838 hw->conv (hw->conv_buf, p2, len2, &nominal_volume); in dsound_run_in()
842 hw->wpos = (hw->wpos + decr) % hw->samples; in dsound_run_in()