Default WaveForm Audio Interface problem

I am using waveform audio interface WaveIn and WaveOut
I am facing a problem when I set the volume of the device while it is playing a .wav file .
I am calling the following api waveOutSetVolume when the slider(for volume )is changed.
but didnt work, Is there a way to do this??
Plz help