Audiokinetic Wwise Knowledge Base

Default Stream Manager's I/O scheduler

Audiokinetic's default I/O scheduler works this way: among all the streams that require an I/O transfer, it chooses the one that has the shortest deadline (regarding clients of the stream manager) and sends a request to the Low-Level I/O.

Standard streams (AK::IAkStdStream) require an I/O transfer whenever the client calls AK::IAkStdStream::Read(). Automatic streams (AK::IAkAutoStream) require an I/O transfer whenever it is running (AK::IAkAutoStream::Start() was called) and its current buffering size is below AkDeviceSettings::uTargetBufferLength (in milliseconds, converted to bytes using each stream's AkAutoStmHeuristics::fThroughput heuristic).

When the Low-Level I/O has completed an I/O transfer, the scheduler enqueues the I/O buffer to the appropriate stream and increments its "available data" (this value is used for deadline computation). Then it schedules another request.

In order to limit the scheduler thread from posting requests all the time and balance the sound engine's load on I/O, you need to specify an AkDeviceSettings::uTargetBufferLength value: the scheduler stops issuing requests to the Low-Level I/O for streams that are buffered with an amount of data that is greater or equal to this value. Note that it is specified in milliseconds, and is internally converted in bytes, depending on the throughput heuristic (which itself depends on the audio format). The client consumes data, and at a certain point, the amount of buffering falls below this threshold, and the scheduler restarts issuing requests for this stream. Refer to the Streaming document in the SDK documentation for more details on the Stream Manager's settings.



Article Details

Last Updated
17th o February, 2010

Would you like to...

Print this page Print this page

Email this page Email this page

Post a comment Post a comment

Subscribe me

Add to favorites Add to favorites

Remove Highlighting Remove Highlighting

Edit this Article

Quick Edit

Export to PDF

User Opinions (0 votes)

No users have voted.

How would you rate this answer?



Thank you for rating this answer.

Related Articles

No related articles were found.

Attachments

No attachments were found.

Continue