638
639
ast_audiohook_lock(audiohook);
639
640
if (audiohook->status != AST_AUDIOHOOK_STATUS_RUNNING) {
640
641
AST_LIST_REMOVE_CURRENT(list);
642
643
ast_audiohook_unlock(audiohook);
643
644
/* We basically drop all of our links to the manipulate audiohook and prod it to do it's own destructive things */
644
645
audiohook->manipulate_callback(audiohook, chan, NULL, direction);
647
648
/* Feed in frame to manipulation */
648
audiohook->manipulate_callback(audiohook, chan, middle_frame, direction);
649
if (audiohook->manipulate_callback(audiohook, chan, middle_frame, direction)) {
649
653
ast_audiohook_unlock(audiohook);
651
655
AST_LIST_TRAVERSE_SAFE_END;
655
661
/* Now we figure out what to do with our end frame (whether to transcode or not) */