Mercurial > sdl-ios-xcode
diff src/audio/mint/SDL_mintaudio.h @ 1895:c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
author | Sam Lantinga <slouken@libsdl.org> |
---|---|
date | Mon, 10 Jul 2006 21:04:37 +0000 |
parents | a11c13151840 |
children | d48ead2d2ba5 |
line wrap: on
line diff
--- a/src/audio/mint/SDL_mintaudio.h Thu Jul 06 18:01:37 2006 +0000 +++ b/src/audio/mint/SDL_mintaudio.h Mon Jul 10 21:04:37 2006 +0000 @@ -37,19 +37,21 @@ #define _THIS SDL_AudioDevice *this /* 16 predivisors with 3 clocks max. */ -#define MINTAUDIO_maxfreqs (16*3) +#define MINTAUDIO_maxfreqs (16*3) -typedef struct { - Uint32 frequency; - Uint32 masterclock; - Uint32 predivisor; - int gpio_bits; /* in case of external clock */ +typedef struct +{ + Uint32 frequency; + Uint32 masterclock; + Uint32 predivisor; + int gpio_bits; /* in case of external clock */ } mint_frequency_t; -struct SDL_PrivateAudioData { - mint_frequency_t frequencies[MINTAUDIO_maxfreqs]; - int freq_count; /* Number of frequencies in the array */ - int numfreq; /* Number of selected frequency */ +struct SDL_PrivateAudioData +{ + mint_frequency_t frequencies[MINTAUDIO_maxfreqs]; + int freq_count; /* Number of frequencies in the array */ + int numfreq; /* Number of selected frequency */ }; /* Old variable names */ @@ -59,23 +61,24 @@ #define MINTAUDIO_numfreq (this->hidden->numfreq) /* _MCH cookie (values>>16) */ -enum { - MCH_ST=0, - MCH_STE, - MCH_TT, - MCH_F30, - MCH_CLONE, - MCH_ARANYM +enum +{ + MCH_ST = 0, + MCH_STE, + MCH_TT, + MCH_F30, + MCH_CLONE, + MCH_ARANYM }; /* Master clocks for replay frequencies */ -#define MASTERCLOCK_STE 8010666 /* Not sure of this one */ -#define MASTERCLOCK_TT 16107953 /* Not sure of this one */ +#define MASTERCLOCK_STE 8010666 /* Not sure of this one */ +#define MASTERCLOCK_TT 16107953 /* Not sure of this one */ #define MASTERCLOCK_FALCON1 25175000 -#define MASTERCLOCK_FALCON2 32000000 /* Only usable for DSP56K */ -#define MASTERCLOCK_FALCONEXT -1 /* Clock on DSP56K port, unknown */ -#define MASTERCLOCK_44K 22579200 /* Standard clock for 44.1 Khz */ -#define MASTERCLOCK_48K 24576000 /* Standard clock for 48 Khz */ +#define MASTERCLOCK_FALCON2 32000000 /* Only usable for DSP56K */ +#define MASTERCLOCK_FALCONEXT -1 /* Clock on DSP56K port, unknown */ +#define MASTERCLOCK_44K 22579200 /* Standard clock for 44.1 Khz */ +#define MASTERCLOCK_48K 24576000 /* Standard clock for 48 Khz */ /* Master clock predivisors */ #define MASTERPREDIV_STE 160 @@ -84,48 +87,50 @@ #define MASTERPREDIV_MILAN 256 /* MFP 68901 interrupt sources */ -enum { - MFP_PARALLEL=0, - MFP_DCD, - MFP_CTS, - MFP_BITBLT, - MFP_TIMERD, - MFP_BAUDRATE=MFP_TIMERD, - MFP_TIMERC, - MFP_200HZ=MFP_TIMERC, - MFP_ACIA, - MFP_DISK, - MFP_TIMERB, - MFP_HBLANK=MFP_TIMERB, - MFP_TERR, - MFP_TBE, - MFP_RERR, - MFP_RBF, - MFP_TIMERA, - MFP_DMASOUND=MFP_TIMERA, - MFP_RING, - MFP_MONODETECT +enum +{ + MFP_PARALLEL = 0, + MFP_DCD, + MFP_CTS, + MFP_BITBLT, + MFP_TIMERD, + MFP_BAUDRATE = MFP_TIMERD, + MFP_TIMERC, + MFP_200HZ = MFP_TIMERC, + MFP_ACIA, + MFP_DISK, + MFP_TIMERB, + MFP_HBLANK = MFP_TIMERB, + MFP_TERR, + MFP_TBE, + MFP_RERR, + MFP_RBF, + MFP_TIMERA, + MFP_DMASOUND = MFP_TIMERA, + MFP_RING, + MFP_MONODETECT }; /* Xbtimer() timers */ -enum { - XB_TIMERA=0, - XB_TIMERB, - XB_TIMERC, - XB_TIMERD +enum +{ + XB_TIMERA = 0, + XB_TIMERB, + XB_TIMERC, + XB_TIMERD }; /* Variables */ extern SDL_AudioDevice *SDL_MintAudio_device; -extern Uint8 *SDL_MintAudio_audiobuf[2]; /* Pointers to buffers */ -extern unsigned long SDL_MintAudio_audiosize; /* Length of audio buffer=spec->size */ -extern volatile unsigned short SDL_MintAudio_numbuf; /* Buffer to play */ +extern Uint8 *SDL_MintAudio_audiobuf[2]; /* Pointers to buffers */ +extern unsigned long SDL_MintAudio_audiosize; /* Length of audio buffer=spec->size */ +extern volatile unsigned short SDL_MintAudio_numbuf; /* Buffer to play */ extern volatile unsigned short SDL_MintAudio_mutex; extern cookie_stfa_t *SDL_MintAudio_stfa; extern volatile unsigned long SDL_MintAudio_clocktics; /* MiNT thread variables */ -extern SDL_bool SDL_MintAudio_mint_present; +extern SDL_bool SDL_MintAudio_mint_present; extern SDL_bool SDL_MintAudio_quit_thread; extern SDL_bool SDL_MintAudio_thread_finished; extern long SDL_MintAudio_thread_pid; @@ -133,7 +138,7 @@ /* Functions */ void SDL_MintAudio_Callback(void); void SDL_MintAudio_AddFrequency(_THIS, Uint32 frequency, Uint32 clock, - Uint32 prediv, int gpio_bits); + Uint32 prediv, int gpio_bits); int SDL_MintAudio_SearchFrequency(_THIS, int desired_freq); /* MiNT thread functions */ @@ -149,3 +154,4 @@ void SDL_MintAudio_StfaInterrupt(void); #endif /* _SDL_mintaudio_h */ +/* vi: set ts=4 sw=4 expandtab: */