diff --git a/src/audio/mockingboard.c b/src/audio/mockingboard.c index ecc5e39c..f3e4abe3 100644 --- a/src/audio/mockingboard.c +++ b/src/audio/mockingboard.c @@ -1161,7 +1161,7 @@ static unsigned long SSI263Thread(void *lpParameter) unsigned long status = 0; SSI263Voice[i].lpDSBvoice->GetStatus(SSI263Voice[i].lpDSBvoice, &status); - if (status & _DSBSTATUS_NOTPLAYING) + if (status & AUDIO_STATUS_NOTPLAYING) { sample_finished = true; break; diff --git a/src/audio/soundcore-openal.c b/src/audio/soundcore-openal.c index cb026f74..80f9592a 100644 --- a/src/audio/soundcore-openal.c +++ b/src/audio/soundcore-openal.c @@ -677,11 +677,11 @@ static long ALGetStatus(void *_this, unsigned long *status) if ((state == AL_PLAYING) || (state == AL_PAUSED)) { - *status = DSBSTATUS_PLAYING; + *status = AUDIO_STATUS_PLAYING; } else { - *status = _DSBSTATUS_NOTPLAYING; + *status = AUDIO_STATUS_NOTPLAYING; } return 0; diff --git a/src/audio/soundcore.h b/src/audio/soundcore.h index 37b93d4f..c92e4ddc 100644 --- a/src/audio/soundcore.h +++ b/src/audio/soundcore.h @@ -10,13 +10,17 @@ */ /* - * Sources derived from AppleWin emulator - * Ported by Aaron Culliney + * Apple //e core sound system support. Source inspired/derived from AppleWin. + * */ #ifndef _SOUNDCORE_H_ #define _SOUNDCORE_H_ +#define MAX_SAMPLES (8*1024) +#define AUDIO_STATUS_PLAYING 0x00000001 +#define AUDIO_STATUS_NOTPLAYING 0x08000000 + typedef struct IDirectSoundBuffer { @@ -43,17 +47,14 @@ typedef struct IDirectSoundBuffer { int (*GetStatus)(void* _this, unsigned long *lpdwStatus); + // Mockingboard-specific HACKS int (*UnlockStaticBuffer)(void* _this, unsigned long dwAudioBytes); - int (*Replay)(void* _this); } IDirectSoundBuffer, *LPDIRECTSOUNDBUFFER, **LPLPDIRECTSOUNDBUFFER; #define DS_OK 0 -#define DSBSTATUS_LOOPING 0x00000004 -#define DSBSTATUS_PLAYING 0x00000001 -#define _DSBSTATUS_NOTPLAYING 0x08000000 #define DSBPLAY_LOOPING 0x00000001 #define DSBVOLUME_MIN -10000 #define DSBVOLUME_MAX 0 @@ -82,16 +83,9 @@ typedef struct IDirectSound { int (*DestroySoundBuffer)(LPDIRECTSOUNDBUFFER * ppDSBuffer); } IDirectSound, *LPDIRECTSOUND; -#define MAX_SAMPLES (8*1024) - typedef struct { LPDIRECTSOUNDBUFFER lpDSBvoice; -#ifdef APPLE2IX - // apparently lpDSNotify isn't used... -#define LPDIRECTSOUNDNOTIFY void* -#endif - LPDIRECTSOUNDNOTIFY lpDSNotify; bool bActive; // Playback is active bool bMute; long nVolume; // Current volume (as used by DirectSound) @@ -125,13 +119,11 @@ void DSUninit(); extern bool soundcore_isAvailable; -#ifdef APPLE2IX typedef struct IDirectSound SoundSystemStruct; long SoundSystemCreate(const char *sound_device, SoundSystemStruct **sound_struct); long SoundSystemDestroy(SoundSystemStruct **sound_struct); long SoundSystemPause(); long SoundSystemUnpause(); long SoundSystemEnumerate(char ***sound_devices, const int maxcount); -#endif #endif /* whole file */