Sound_Player module

Sound_Player_Config

structSource

Settings for sound_player_init. The default works: it mixes on its own thread and keeps sounds playing when the window loses focus only if audible_when_window_is_not_in_focus is set. release_asset is called when a stream ends, so the program can free what the stream used.

Example
config: Sound_Player_Config;
config.update_from_a_thread = false;  // mix inside update() instead
config.audible_when_window_is_not_in_focus = true;
assert(sound_player_init(config));

This one is only checked to compile, not run.

Fields

update_from_a_thread: := true
audible_when_window_is_not_in_focus: := false
keep_sounds_alive_by_default: := true
seconds_to_fill_ahead: := 2.4 / 60.0
set_async_thread_priority: () -> ()
release_asset: (stream: *Sound_Stream, data: *Sound_Data)

See also