diff src/audio/mint/SDL_mintaudio.h @ 1662:782fd950bd46 SDL-1.3

Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API. WARNING: None of the video drivers have been updated for the new API yet! The API is still under design and very fluid. The code is now run through a consistent indent format: indent -i4 -nut -nsc -br -ce The headers are being converted to automatically generate doxygen documentation.
author Sam Lantinga <slouken@libsdl.org>
date Sun, 28 May 2006 13:04:16 +0000
parents 14717b52abc0
children 4da1ee79c9af
line wrap: on
line diff
--- a/src/audio/mint/SDL_mintaudio.h	Sun May 21 17:27:13 2006 +0000
+++ b/src/audio/mint/SDL_mintaudio.h	Sun May 28 13:04:16 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,68 +87,71 @@
 #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;
 
 /* Functions */
-void SDL_MintAudio_Callback(void);
-void SDL_MintAudio_AddFrequency(_THIS, Uint32 frequency, Uint32 clock,
-	Uint32 prediv, int gpio_bits);
-int SDL_MintAudio_SearchFrequency(_THIS, int desired_freq);
+void SDL_MintAudio_Callback (void);
+void SDL_MintAudio_AddFrequency (_THIS, Uint32 frequency, Uint32 clock,
+                                 Uint32 prediv, int gpio_bits);
+int SDL_MintAudio_SearchFrequency (_THIS, int desired_freq);
 
 /* MiNT thread functions */
-int SDL_MintAudio_Thread(long param);
-void SDL_MintAudio_WaitThread(void);
+int SDL_MintAudio_Thread (long param);
+void SDL_MintAudio_WaitThread (void);
 
 /* ASM interrupt functions */
-void SDL_MintAudio_GsxbInterrupt(void);
-void SDL_MintAudio_EmptyGsxbInterrupt(void);
-void SDL_MintAudio_XbiosInterruptMeasureClock(void);
-void SDL_MintAudio_XbiosInterrupt(void);
-void SDL_MintAudio_Dma8Interrupt(void);
-void SDL_MintAudio_StfaInterrupt(void);
+void SDL_MintAudio_GsxbInterrupt (void);
+void SDL_MintAudio_EmptyGsxbInterrupt (void);
+void SDL_MintAudio_XbiosInterruptMeasureClock (void);
+void SDL_MintAudio_XbiosInterrupt (void);
+void SDL_MintAudio_Dma8Interrupt (void);
+void SDL_MintAudio_StfaInterrupt (void);
 
 #endif /* _SDL_mintaudio_h */
+/* vi: set ts=4 sw=4 expandtab: */