Reference Manual - 1.1.1
FusionSound Interfaces   IFusionSoundStream

IFusionSoundStream represents a ring buffer for streamed playback which fairly maps to writing to a sound device. Use it for easy porting of applications that use exclusive access to a sound device.

Writing to the ring buffer triggers the playback if it's not already running. The method Write() can be called with an arbitrary number of samples. It returns after all samples have been written to the ring buffer and sleeps while the ring buffer is full. Blocking writes are perfect for accurate filling of the buffer, which keeps the ring buffer as full as possible using a very small block size (depending on sample rate, playback pitch and the underlying hardware).

Waiting for a specific amount of free space in the ring buffer is provided by Wait(). It can be used to avoid blocking of Write() or to finish playback before destroying the interface.

Status information includes the amount of filled and total space in the ring buffer, along with the current read and write position. It can be retrieved by calling GetStatus() at any time without blocking.

Methods of IFusionSoundStream
Information GetDescription Get a description of the stream.
Ring buffer Write Fill the ring buffer with data.
Wait Wait for a specified amount of free ring buffer space.
GetStatus Query ring buffer status.
Flush Flush the ring buffer.
Drop Drop pending data.
Timing GetPresentationDelay Query the presentation delay.
Playback control GetPlayback Retrieve advanced playback control interface.
Direct memory access Access Access the ring buffer to fill it with data.
Commit Commit written data to the stream.