Home | History | Annotate | Download | only in audio

Lines Matching defs:glue

39 static void glue (audio_init_nb_voices_, TYPE) (struct audio_driver *drv)
42 int max_voices = glue (drv->max_voices_, TYPE);
43 int voice_size = glue (drv->voice_size_, TYPE);
45 if (glue (s->nb_hw_voices_, TYPE) > max_voices) {
54 glue (s->nb_hw_voices_, TYPE),
57 glue (s->nb_hw_voices_, TYPE) = max_voices;
63 glue (s->nb_hw_voices_, TYPE) = 0;
72 static void glue (audio_pcm_hw_free_resources_, TYPE) (HW *hw)
81 static int glue (audio_pcm_hw_alloc_resources_, TYPE) (HW *hw)
93 static void glue (audio_pcm_sw_free_resources_, TYPE) (SW *sw)
107 static int glue (audio_pcm_sw_alloc_resources_, TYPE) (SW *sw)
137 static int glue (audio_pcm_sw_init_, TYPE) (
168 err = glue (audio_pcm_sw_alloc_resources_, TYPE) (sw);
176 static void glue (audio_pcm_sw_fini_, TYPE) (SW *sw)
178 glue (audio_pcm_sw_free_resources_, TYPE) (sw);
185 static void glue (audio_pcm_hw_add_sw_, TYPE) (HW *hw, SW *sw)
190 static void glue (audio_pcm_hw_del_sw_, TYPE) (SW *sw)
195 static void glue (audio_pcm_hw_gc_, TYPE) (HW **hwp)
205 glue (s->nb_hw_voices_, TYPE) += 1;
206 glue (audio_pcm_hw_free_resources_ ,TYPE) (hw);
208 glue (hw->pcm_ops->fini_, TYPE) (hw);
215 static HW *glue (audio_pcm_hw_find_any_, TYPE) (HW *hw)
218 return hw ? hw->entries.le_next : glue (s->hw_head_, TYPE).lh_first;
221 static HW *glue (audio_pcm_hw_find_any_enabled_, TYPE) (HW *hw)
223 while ((hw = glue (audio_pcm_hw_find_any_, TYPE) (hw))) {
231 static HW *glue (audio_pcm_hw_find_specific_, TYPE) (
236 while ((hw = glue (audio_pcm_hw_find_any_, TYPE) (hw))) {
244 static HW *glue (audio_pcm_hw_add_new_, TYPE) (struct audsettings *as)
251 if (!glue (s->nb_hw_voices_, TYPE)) {
265 hw = audio_calloc (AUDIO_FUNC, 1, glue (drv->voice_size_, TYPE));
268 drv->name, glue (drv->voice_size_, TYPE));
278 err = glue (hw->pcm_ops->init_, TYPE) (hw, as);
298 if (glue (audio_pcm_hw_alloc_resources_, TYPE) (hw)) {
302 QLIST_INSERT_HEAD (&s->glue (hw_head_, TYPE), hw, entries);
303 glue (s->nb_hw_voices_, TYPE) -= 1;
311 glue (hw->pcm_ops->fini_, TYPE) (hw);
318 static HW *glue (audio_pcm_hw_add_, TYPE) (struct audsettings *as)
322 if (glue (conf.fixed_, TYPE).enabled && glue (conf.fixed_, TYPE).greedy) {
323 hw = glue (audio_pcm_hw_add_new_, TYPE) (as);
329 hw = glue (audio_pcm_hw_find_specific_, TYPE) (NULL, as);
334 hw = glue (audio_pcm_hw_add_new_, TYPE) (as);
339 return glue (audio_pcm_hw_find_any_, TYPE) (NULL);
342 static SW *glue (audio_pcm_create_voice_pair_, TYPE) (
351 if (glue (conf.fixed_, TYPE).enabled) {
352 hw_as = glue (conf.fixed_, TYPE).settings;
365 hw = glue (audio_pcm_hw_add_, TYPE) (&hw_as);
370 glue (audio_pcm_hw_add_sw_, TYPE) (hw, sw);
372 if (glue (audio_pcm_sw_init_, TYPE) (sw, hw, sw_name, as)) {
379 glue (audio_pcm_hw_del_sw_, TYPE) (sw);
380 glue (audio_pcm_hw_gc_, TYPE) (&hw);
387 static void glue (audio_close_, TYPE) (SW *sw)
389 glue (audio_pcm_sw_fini_, TYPE) (sw);
390 glue (audio_pcm_hw_del_sw_, TYPE) (sw);
391 glue (audio_pcm_hw_gc_, TYPE) (&sw->hw);
395 void glue (AUD_close_, TYPE) (QEMUSoundCard *card, SW *sw)
403 glue (audio_close_, TYPE) (sw);
407 SW *glue (AUD_open_, TYPE) (
468 if (!glue (conf.fixed_, TYPE).enabled && sw) {
469 glue (AUD_close_, TYPE) (card, sw);
482 glue (audio_pcm_sw_fini_, TYPE) (sw);
483 if (glue (audio_pcm_sw_init_, TYPE) (sw, hw, name, as)) {
488 sw = glue (audio_pcm_create_voice_pair_, TYPE) (name, as);
526 glue (AUD_close_, TYPE) (card, sw);
530 int glue (AUD_is_active_, TYPE) (SW *sw)
535 void glue (AUD_init_time_stamp_, TYPE) (SW *sw, QEMUAudioTimeStamp *ts)
544 uint64_t glue (AUD_get_elapsed_usec_, TYPE) (SW *sw, QEMUAudioTimeStamp *ts)