Where does asterisk call app functions?

more specifically, the app_mplayer.c mp3_exec function.

asterisk takes and entire second to execute one mplayer mp3 to another. meaning the end of one mp3 is reached, and a full second(sometimes a little longer) passes before the next is started.(and thats after some some time optimization in mp3_exec to shave off another second.) I need to see if i can optimize asterisk to not take an entire second to call app_mplayer.c again.

it sounds trivial but for what we use asterisk for there is a significant delay in response times and we need to shave off times of dead silence that asterisk seems to be causing due to execution slowdowns.