Lines Matching defs:cap

431 void AUD_vlog (const char *cap, const char *fmt, va_list va)
435 if (cap) {
436 Log (("%s: %N", cap, fmt, &va2));
444 void AUD_log (const char *cap, const char *fmt, ...)
449 AUD_vlog (cap, fmt, va);
748 CaptureVoiceOut *cap;
750 for (cap = s->cap_head.lh_first; cap; cap = cap->entries.le_next) {
751 if (audio_pcm_info_eq (&cap->hw.info, as)) {
752 return cap;
758 static void audio_notify_capture (CaptureVoiceOut *cap, audcnotification_e cmd)
765 for (cb = cap->cb_head.lh_first; cb; cb = cb->entries.le_next) {
770 static void audio_capture_maybe_changed (CaptureVoiceOut *cap, int enabled)
772 if (cap->hw.enabled != enabled) {
774 cap->hw.enabled = enabled;
776 audio_notify_capture (cap, cmd);
780 static void audio_recalc_and_notify_capture (CaptureVoiceOut *cap)
782 HWVoiceOut *hw = &cap->hw;
792 audio_capture_maybe_changed (cap, enabled);
802 CaptureVoiceOut *cap = sc->cap;
817 audio_recalc_and_notify_capture (cap);
825 CaptureVoiceOut *cap;
828 for (cap = s->cap_head.lh_first; cap; cap = cap->entries.le_next) {
831 HWVoiceOut *hw_cap = &cap->hw;
840 sc->cap = cap;
862 audio_capture_maybe_changed (cap, 1);
1116 static void audio_pcm_print_info (const char *cap, struct audio_pcm_info *info)
1119 cap, info->bits, info->sign, info->freq, info->nchannels);
1205 audio_capture_maybe_changed (sc->cap, 1);
1365 audio_recalc_and_notify_capture (sc->cap);
1475 CaptureVoiceOut *cap;
1477 for (cap = s->cap_head.lh_first; cap; cap = cap->entries.le_next) {
1479 HWVoiceOut *hw = &cap->hw;
1491 hw->clip (cap->buf, src, to_capture);
1494 for (cb = cap->cb_head.lh_first; cb; cb = cb->entries.le_next) {
1495 cb->ops.capture (cb->opaque, cap->buf,
1625 CaptureVoiceOut *cap = sc->cap;
1628 for (cb = cap->cb_head.lh_first; cb; cb = cb->entries.le_next) {
1785 CaptureVoiceOut *cap;
1808 cap = audio_pcm_capture_find_specific (s, as);
1809 if (cap) {
1810 LIST_INSERT_HEAD (&cap->cb_head, cb, entries);
1811 return cap;
1816 CaptureVoiceOut *cap;
1819 cap = audio_calloc (AUDIO_FUNC, 1, sizeof (*cap));
1820 if (!cap) {
1822 sizeof (*cap));
1826 hw = &cap->hw;
1828 LIST_INIT (&cap->cb_head);
1842 cap->buf = audio_calloc (AUDIO_FUNC, hw->samples, 1 << hw->info.shift);
1843 if (!cap->buf) {
1856 LIST_INSERT_HEAD (&s->cap_head, cap, entries);
1857 LIST_INSERT_HEAD (&cap->cb_head, cb, entries);
1863 return cap;
1866 qemu_free (cap->hw.mix_buf);
1868 qemu_free (cap);
1876 void AUD_del_capture (CaptureVoiceOut *cap, void *cb_opaque)
1880 for (cb = cap->cb_head.lh_first; cb; cb = cb->entries.le_next) {
1886 if (!cap->cb_head.lh_first) {
1887 SWVoiceOut *sw = cap->hw.sw_head.lh_first, *sw1;
1905 LIST_REMOVE (cap, entries);
1906 qemu_free (cap);