Lines Matching full:hw

54     HWVoiceOut hw;  member
61 HWVoiceIn hw; member
321 static void dsound_clear_sample (HWVoiceOut *hw, LPDIRECTSOUNDBUFFER dsb, in dsound_clear_sample() argument
330 &hw->info, in dsound_clear_sample()
332 hw->size_emul, in dsound_clear_sample()
342 len1 = blen1 / hw->info.bytes_per_frame; in dsound_clear_sample()
343 len2 = blen2 / hw->info.bytes_per_frame; in dsound_clear_sample()
352 audio_pcm_info_clear_buf (&hw->info, p1, len1); in dsound_clear_sample()
356 audio_pcm_info_clear_buf (&hw->info, p2, len2); in dsound_clear_sample()
383 static void dsound_enable_out(HWVoiceOut *hw, bool enable) in dsound_enable_out() argument
387 DSoundVoiceOut *ds = (DSoundVoiceOut *) hw; in dsound_enable_out()
406 dsound_clear_sample (hw, dsb, s); in dsound_enable_out()
430 static size_t dsound_buffer_get_free(HWVoiceOut *hw) in dsound_buffer_get_free() argument
432 DSoundVoiceOut *ds = (DSoundVoiceOut *) hw; in dsound_buffer_get_free()
445 hw->pos_emul = wpos; in dsound_buffer_get_free()
449 return audio_ring_dist(ppos, hw->pos_emul, hw->size_emul); in dsound_buffer_get_free()
452 static void *dsound_get_buffer_out(HWVoiceOut *hw, size_t *size) in dsound_get_buffer_out() argument
454 DSoundVoiceOut *ds = (DSoundVoiceOut *)hw; in dsound_get_buffer_out()
461 req_size = MIN(*size, hw->size_emul - hw->pos_emul); in dsound_get_buffer_out()
464 err = dsound_lock_out(dsb, &hw->info, hw->pos_emul, req_size, &ret, NULL, in dsound_get_buffer_out()
476 static size_t dsound_put_buffer_out(HWVoiceOut *hw, void *buf, size_t len) in dsound_put_buffer_out() argument
478 DSoundVoiceOut *ds = (DSoundVoiceOut *) hw; in dsound_put_buffer_out()
486 hw->pos_emul = (hw->pos_emul + len) % hw->size_emul; in dsound_put_buffer_out()
491 static void dsound_enable_in(HWVoiceIn *hw, bool enable) in dsound_enable_in() argument
495 DSoundVoiceIn *ds = (DSoundVoiceIn *) hw; in dsound_enable_in()
537 static void *dsound_get_buffer_in(HWVoiceIn *hw, size_t *size) in dsound_get_buffer_in() argument
539 DSoundVoiceIn *ds = (DSoundVoiceIn *) hw; in dsound_get_buffer_in()
555 hw->pos_emul = rpos; in dsound_get_buffer_in()
559 req_size = audio_ring_dist(rpos, hw->pos_emul, hw->size_emul); in dsound_get_buffer_in()
560 req_size = MIN(*size, MIN(req_size, hw->size_emul - hw->pos_emul)); in dsound_get_buffer_in()
567 err = dsound_lock_in(dscb, &hw->info, hw->pos_emul, req_size, &ret, NULL, in dsound_get_buffer_in()
579 static void dsound_put_buffer_in(HWVoiceIn *hw, void *buf, size_t len) in dsound_put_buffer_in() argument
581 DSoundVoiceIn *ds = (DSoundVoiceIn *) hw; in dsound_put_buffer_in()
589 hw->pos_emul = (hw->pos_emul + len) % hw->size_emul; in dsound_put_buffer_in()