Audio Library Clients Preemption

I wrote an application based on qnx’s wave.c sample; intending for my
application to play sound without being preempted and generate underrun, i
have to higher it’s priority.

To have a fast response, i first preload my wav files;

To play the sound, i have to write (snd_pcm_write()) several times with a
“frag size” within a loop, until the file is entirely played. (the …write
function blocks).

Is there a way to write my whole sound file (snd_pcm_write()) at once and
let io-audio do the DMA and interrupt stuff itself ?

Is there a workaround for me to “write and forget” my sound ?