Mercurial > hg > dmlib
changeset 785:dbf5772690a8
Cosmetics.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Sat, 03 Aug 2013 23:48:46 +0300 |
parents | 35b881454ea2 |
children | bc95f8a6d89c |
files | dmengine.c dmengine.h dmsimple.c |
diffstat | 3 files changed, 15 insertions(+), 13 deletions(-) [+] |
line wrap: on
line diff
--- a/dmengine.c Sat Aug 03 23:48:12 2013 +0300 +++ b/dmengine.c Sat Aug 03 23:48:46 2013 +0300 @@ -350,6 +350,7 @@ JSS_UNLOCK(eng->jssPlr); } + void engineGetJSSChannelInfo(DMEngineData *eng, const int channel, int *ninst, int *nextInst, int *freq, int *note) { JSS_LOCK(eng->jssPlr); @@ -393,6 +394,17 @@ } +void enginePauseAudio(int status) +{ + if (status) + engine.audioStatus = SDL_AUDIO_PAUSED; + else + engine.audioStatus = SDL_AUDIO_PLAYING; + + SDL_PauseAudio(status); +} + + int engineGetVideoAspect(int width, int height) { if (width > 0 && height > 0)
--- a/dmengine.h Sat Aug 03 23:48:12 2013 +0300 +++ b/dmengine.h Sat Aug 03 23:48:46 2013 +0300 @@ -254,10 +254,10 @@ SDL_AudioSpec optAfmt; int optAudioSetup; - int audioStatus; + int audioStatus; // Current status of audio output (SDL_AUDIO_PLAYING, etc.) DMMutex *audioStreamMutex; Uint8 * audioStreamBuf; - size_t audioStreamLen; + size_t audioStreamLen; // Length in samples // No-sound audio simulation thread stuff SDL_Thread *audioSimThread; @@ -365,6 +365,7 @@ int engineGetTick(DMEngineData *eng); float engineGetTimeDT(DMEngineData *eng); +void enginePauseAudio(int status); int engineGetVideoAspect(int width, int height);
--- a/dmsimple.c Sat Aug 03 23:48:12 2013 +0300 +++ b/dmsimple.c Sat Aug 03 23:48:46 2013 +0300 @@ -102,17 +102,6 @@ } -static void enginePauseAudio(int status) -{ - if (status) - engine.audioStatus = SDL_AUDIO_PAUSED; - else - engine.audioStatus = SDL_AUDIO_PLAYING; - - SDL_PauseAudio(status); -} - - static int engineAudioThreadFunc(void *userdata) { do