Skip to content

GB_gbs_switch_track

Lior Halphon edited this page Nov 30, 2024 · 3 revisions

Definition

void GB_gbs_switch_track(GB_gameboy_t *gb, uint8_t track);

In gb.h

Description

Resets the emulator instance and sets it to play the specified track number in the currently loaded GBS file.

Thread Safety

GB_gbs_switch_track must not be called if the instance is being run in any thread, including the current one (via a callback).

Notes

This function replaces GB_reset and GB_quick_reset on emulator instances that successfully loaded a GBS file. Do not call this function on emulator instances that have a different type of file loaded, and vice versa.

You must call this function sometime after GB_load_gbs or GB_load_gbs_from_buffer and before the first call to GB_run or GB_run_frame.

If you call GB_switch_model_and_reset on an emulator instance that has a GBS file loaded, you must call this function before the first call to GB_run or GB_run_frame.

See Also

Clone this wiki locally