Lines Matching refs:hw

42     HWVoiceOut hw;
58 HWVoiceIn hw;
77 static void winmm_run_out (HWVoiceOut *hw)
79 OSSVoiceOut *oss = (OSSVoiceOut *) hw;
86 live = pcm_hw_get_live (hw, NULL);
98 if (abs (hw->samples - live) < 64)
103 samples = oss->default_bufsize >> hw->info.shift;
110 rpos = hw->rpos;
114 int left_till_end_samples = hw->samples - rpos;
127 src = advance (hw->mix_buf, rpos * sizeof (st_sample_t));
132 hw->clip (dst, src, convert_samples);
133 sniffer_run_out (hw, dst, convert_samples);
136 oss->lpwh[oss->idxBuffer].dwBufferLength = convert_samples << hw->info.shift;
146 rpos = (rpos + convert_samples) % hw->samples;
154 pcm_hw_dec_live (hw, decr);
155 hw->rpos = rpos;
159 static void winmm_fini_out (HWVoiceOut *hw)
162 OSSVoiceOut *oss = (OSSVoiceOut *) hw;
195 static int winmm_init_out (HWVoiceOut *hw, int freq, int nchannels, audfmt_e fmt)
197 OSSVoiceOut *oss = (OSSVoiceOut *) hw;
202 Log(("winmm_init_out %x freq=%d nchannels=%d\n", hw, freq, nchannels));
237 pcm_init_info (&hw->info, freq, nchannels, fmt);
238 hw->bufsize = WINMM_NUMBER_BUFFERS * WINMM_BUFFER_SIZE;
240 oss->pcm_buf = RTMemAllocZ (hw->bufsize);
249 Log(("PCM buffer %08X size %d\n", oss->pcm_buf, hw->bufsize));
250 oss->cBuffers = hw->bufsize / WINMM_BUFFER_SIZE;
280 static int winmm_ctl_out (HWVoiceOut *hw, int cmd, ...)
282 OSSVoiceOut *oss = (OSSVoiceOut *) hw;
302 oss->cBuffers = hw->bufsize / buflen;
336 pcm_info_clear (&hw->info, oss->pcm_buf, hw->samples);
352 static int winmm_init_in (HWVoiceIn *hw,
355 OSSVoiceIn *oss = (OSSVoiceIn *) hw;
390 pcm_init_info (&hw->info, freq, nchannels, fmt);
391 hw->bufsize = waveInfo.nAvgBytesPerSec/2;
393 oss->pcm_buf = RTMemAllocZ (hw->bufsize);
403 static void winmm_fini_in (HWVoiceIn *hw)
406 OSSVoiceIn *oss = (OSSVoiceIn *) hw;
418 static void winmm_run_in (HWVoiceIn *hw)
421 OSSVoiceIn *oss = (OSSVoiceIn *) hw;
422 int hwshift = hw->info.shift;
424 int live = hw->total_samples_acquired - pcm_hw_find_min_samples_in (hw);
425 int dead = hw->samples - live;
431 { hw->wpos },
437 hw->total_samples_acquired, pcm_hw_find_min_samples_in (hw)));
441 if (hw->wpos + dead > hw->samples) {
442 bufs[0].len = (hw->samples - hw->wpos) << hwshift;
443 bufs[1].len = (dead - (hw->samples - hw->wpos)) << hwshift;
458 if (nread & hw->info.align) {
462 hw->conv (hw->conv_buf + bufs[i].add, p, nread >> hwshift,
481 hw->total_samples_acquired += read_samples;
482 hw->wpos = (hw->wpos + read_samples) % hw->samples;
491 static int winmm_ctl_in (HWVoiceIn *hw, int cmd, ...)
493 (void) hw;