Stopping the playback

If the application wishes to stop playback, it can simply stop sending data and let the subchannel underrun as described above, but there are better ways.

If you want your application to stop as soon as possible, call one of the drop functions to discard any buffered data:

If you want to play out all data in the buffers before stopping, call one of:

The drain functions block until all buffered data is played out and the stream is stopped.