comparison src/audacious/output.c @ 4323:04ade98fafa3

vis moved to separate flow. works in passthrough mode too
author Eugene Zagidullin <e.asphyx@gmail.com>
date Thu, 13 Mar 2008 01:42:59 +0300
parents cfaecedace4e
children 695e1c91be36
comparison
equal deleted inserted replaced
4320:1028f5cf9b4a 4323:04ade98fafa3
506 gint length, /* length of sample */ 506 gint length, /* length of sample */
507 gpointer ptr, /* data */ 507 gpointer ptr, /* data */
508 int *going /* 0 when time to stop */ 508 int *going /* 0 when time to stop */
509 ) 509 )
510 { 510 {
511 static Flow *visualization_flow = NULL;
511 static Flow *postproc_flow = NULL; 512 static Flow *postproc_flow = NULL;
512 static Flow *legacy_flow = NULL; 513 static Flow *legacy_flow = NULL;
513 OutputPlugin *op = playback->output; 514 OutputPlugin *op = playback->output;
514 gint writeoffs; 515 gint writeoffs;
515 gpointer float_ptr; 516 gpointer float_ptr;
517
518 if (visualization_flow == NULL)
519 {
520 visualization_flow = flow_new();
521 flow_link_element(visualization_flow, vis_flow);
522 }
523
524 plugin_set_current((Plugin *)(playback->output));
525 gint time = playback->output->written_time();
526
527 flow_execute(visualization_flow, time, &ptr, length, fmt, decoder_srate, nch);
516 528
517 if (!bypass_dsp) { 529 if (!bypass_dsp) {
518 530
519 if(length <= 0 || sad_state_from_float == NULL || sad_state_to_float == NULL) return; 531 if(length <= 0 || sad_state_from_float == NULL || sad_state_to_float == NULL) return;
520 532
521 plugin_set_current((Plugin *)(playback->output));
522 gint time = playback->output->written_time();
523
524 if (legacy_flow == NULL) 533 if (legacy_flow == NULL)
525 { 534 {
526 legacy_flow = flow_new(); 535 legacy_flow = flow_new();
527 flow_link_element(legacy_flow, effect_flow); 536 flow_link_element(legacy_flow, effect_flow);
528 } 537 }
529 538
530 if (postproc_flow == NULL) 539 if (postproc_flow == NULL)
531 { 540 {
532 postproc_flow = flow_new(); 541 postproc_flow = flow_new();
533 flow_link_element(postproc_flow, vis_flow);
534 #ifdef USE_SRC 542 #ifdef USE_SRC
535 flow_link_element(postproc_flow, src_flow); 543 flow_link_element(postproc_flow, src_flow);
536 #endif 544 #endif
537 flow_link_element(postproc_flow, equalizer_flow); 545 flow_link_element(postproc_flow, equalizer_flow);
538 flow_link_element(postproc_flow, volumecontrol_flow); 546 flow_link_element(postproc_flow, volumecontrol_flow);