Lines Matching refs:hw

53     } hw;
366 static int pulse_init_out (HWVoiceOut *hw, audsettings_t *as)
368 PulseVoice *pPulse = (PulseVoice *) hw;
399 audio_pcm_init_info (&hw->info, &obt_as);
410 hw->samples = cbBuf >> hw->info.shift;
415 static void pulse_fini_out (HWVoiceOut *hw)
417 PulseVoice *pPulse = (PulseVoice *)hw;
435 static int pulse_run_out (HWVoiceOut *hw)
437 PulseVoice *pPulse = (PulseVoice *) hw;
448 cFramesLive = audio_pcm_hw_get_live_out (hw);
467 cFramesAvail = cbAvail >> hw->info.shift; /* bytes => samples */
474 cFramesToWrite = audio_MIN (csSamples, hw->samples - hw->rpos);
475 cbToWrite = cFramesToWrite << hw->info.shift;
476 psSrc = hw->mix_buf + hw->rpos;
477 pu8Dst = advance (pPulse->pPCMBuf, hw->rpos << hw->info.shift);
479 hw->clip (pu8Dst, psSrc, cFramesToWrite);
488 hw->rpos = (hw->rpos + cFramesToWrite) % hw->samples;
503 static int pulse_ctl_out (HWVoiceOut *hw, int cmd, ...)
505 PulseVoice *pPulse = (PulseVoice *) hw;
549 static int pulse_init_in (HWVoiceIn *hw, audsettings_t *as)
551 PulseVoice *pPulse = (PulseVoice *) hw;
575 audio_pcm_init_info (&hw->info, &obt_as);
576 hw->samples = audio_MIN(pPulse->BufAttr.fragsize * 10, pPulse->BufAttr.maxlength)
577 >> hw->info.shift;
583 static void pulse_fini_in (HWVoiceIn *hw)
585 PulseVoice *pPulse = (PulseVoice *)hw;
597 static int pulse_run_in (HWVoiceIn *hw)
599 PulseVoice *pPulse = (PulseVoice *) hw;
600 const int hwshift = hw->info.shift;
627 cFramesToRead = audio_MIN(cFramesAvail, hw->samples - audio_pcm_hw_get_live_in(hw));
647 if (hw->wpos + cFramesToPeek > hw->samples)
649 int cFramesDelta = hw->samples - hw->wpos;
651 hw->conv(hw->conv_buf + hw->wpos,
656 hw->conv(hw->conv_buf,
663 hw->conv(hw->conv_buf + hw->wpos,
670 hw->wpos = (hw->wpos + cFramesToPeek) % hw->samples;
691 static int pulse_ctl_in (HWVoiceIn *hw, int cmd, ...)
693 PulseVoice *pPulse = (PulseVoice *)hw;