Full savestating to memory

This commit is contained in:
2025-05-23 15:49:26 -06:00
parent e9d5b359d0
commit b86d550812
23 changed files with 378 additions and 56 deletions

View File

@ -992,3 +992,15 @@ void audio_write(u16 address, u8 value){
}
}
}
void audio_save_state(audio_state* state) {
state->ctx = ctx;
state->ctx.left_audio_buffer = 0;
state->ctx.right_audio_buffer = 0;
}
void audio_load_state(const audio_state* state) {
ctx = state->ctx;
ctx.left_audio_buffer = malloc(sizeof(float) * FRAMES_PER_BUFFER);
ctx.right_audio_buffer = malloc(sizeof(float) * FRAMES_PER_BUFFER);
}