Mercurial > hg > dmlib
comparison src/dmsimple.c @ 1263:4e9deb14e67f
Fix audio sync with nosound.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Fri, 22 May 2015 20:41:53 +0300 |
parents | 848a88ce7a57 |
children | 132706e3b94b |
comparison
equal
deleted
inserted
replaced
1262:dc9b20d77bc9 | 1263:4e9deb14e67f |
---|---|
820 dmPrint(1, "Starting up.\n"); | 820 dmPrint(1, "Starting up.\n"); |
821 | 821 |
822 engine.startTime = SDL_GetTicks(); | 822 engine.startTime = SDL_GetTicks(); |
823 | 823 |
824 SDL_LockAudio(); | 824 SDL_LockAudio(); |
825 enginePauseAudio(0); | 825 enginePauseAudio(&engine, 0); |
826 SDL_UnlockAudio(); | 826 SDL_UnlockAudio(); |
827 | 827 |
828 while (!engine.exitFlag) | 828 while (!engine.exitFlag) |
829 { | 829 { |
830 while (SDL_PollEvent(&engine.event)) | 830 while (SDL_PollEvent(&engine.event)) |
926 | 926 |
927 dmPrint(1, "Shutting down.\n"); | 927 dmPrint(1, "Shutting down.\n"); |
928 SDL_ShowCursor(SDL_ENABLE); | 928 SDL_ShowCursor(SDL_ENABLE); |
929 | 929 |
930 SDL_LockAudio(); | 930 SDL_LockAudio(); |
931 enginePauseAudio(1); | 931 enginePauseAudio(&engine, 1); |
932 #ifdef DM_USE_JSS | 932 #ifdef DM_USE_JSS |
933 if (engine.optAudioSetup == DM_ASETUP_JSS) | 933 if (engine.optAudioSetup == DM_ASETUP_JSS) |
934 { | 934 { |
935 jmpClose(engine.jssPlr); | 935 jmpClose(engine.jssPlr); |
936 jvmClose(engine.jssDev); | 936 jvmClose(engine.jssDev); |