uxn

Varvara Ordinator, written in ANSI C(SDL2)
git clone https://git.eamoncaddigan.net/uxn.git
Log | Files | Refs | README | LICENSE

commit c1c948705783628a42305511ebbb870d572ffbbb
parent 21ce072e9da65ed0c81bd6e9d45560df467918e2
Author: Devine Lu Linvega <aliceffekt@gmail.com>
Date:   Fri, 26 Jul 2024 07:57:08 -0700

Use global uxn instance for the audio thread

Diffstat:
Msrc/uxnemu.c | 4++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/uxnemu.c b/src/uxnemu.c @@ -46,7 +46,7 @@ WITH REGARD TO THIS SOFTWARE. #define HEIGHT 40 * 8 #define TIMEOUT_MS 334 -Uxn uxn, uxn_audio; +Uxn uxn; static SDL_Window *emu_window; static SDL_Texture *emu_texture; @@ -229,7 +229,7 @@ emu_init(void) as.channels = 2; as.callback = audio_handler; as.samples = AUDIO_BUFSIZE; - as.userdata = &uxn_audio; + as.userdata = &uxn; if(SDL_Init(SDL_INIT_VIDEO | SDL_INIT_AUDIO | SDL_INIT_JOYSTICK) < 0) return system_error("sdl", SDL_GetError()); audio_id = SDL_OpenAudioDevice(NULL, 0, &as, NULL, 0);