HRESULT Flush(void);
Clears the object's internal buffer and resets the audio device, but does not stop the playing or recording of audio data.
· Returns NOERROR if successful, or one of these values:
AUDERR_INVALIDHANDLE
AUDERR_NEEDWAVEFORMAT
AUDERR_WAVEDEVICEBUSY
Flush calls the waveOutReset multimedia function for a wave-out device or the waveInReset multimedia function for a wave-in device.
For an audio-destination object, calling Flush automatically stops the audio output because it empties the internal buffer of audio data to be played. However, if audio was playing before Flush was called (and unless the IAudio::Stop member function is called), the audio begins playing again as soon as the internal buffer contains more audio data.
For an audio-source object, calling Flush automatically stops recording audio data. As for an audio-destination object, if recording was in process before Flush was called (and unless Stop is called), recording will resume as soon as more audio data is received.