TuMengyu95,
I'm not 100% sure why this doesn't work, but the looper and refiller both run in Matlab instances that are running with the -nojvm option, so that might have something to do with it. If you start WaveSurfer with with --debug option, you will be able to see the Matlab windows for these processes, and you may see error messages that indicate something about the nature of the problem.
If you're not doing any other kind of stimulation, you might consider setting up a stimulus that contains the audio waveform you want to output, and set up the stimulus map to output it via an AO channel. Then set up the stimulation to be externally triggered on a PFI line (in the Triggering panel). Then, in samplesAcquired(), set a DO line high and then low immediately. Then connect that DO line to whichever PFI line is set up to trigger the audio waveform. Then connect the AO line to a self-amplified speaker. This should do what you want.
Hope this helps,
Adam