diff src/audio/mint/SDL_mintaudio_mcsn.c @ 2060:866052b01ee5

indent is evil
author Sam Lantinga <slouken@libsdl.org>
date Sat, 28 Oct 2006 16:48:03 +0000
parents 5f6550e5184f
children 29e07f91bc1f
line wrap: on
line diff
--- a/src/audio/mint/SDL_mintaudio_mcsn.c	Sat Oct 28 16:41:54 2006 +0000
+++ b/src/audio/mint/SDL_mintaudio_mcsn.c	Sat Oct 28 16:48:03 2006 +0000
@@ -93,7 +93,8 @@
         }
 
         /* Wait if currently playing sound */
-        while (SDL_MintAudio_mutex != 0) {}
+        while (SDL_MintAudio_mutex != 0) {
+        }
 
         /* Clear buffers */
         if (SDL_MintAudio_audiobuf[0]) {
@@ -119,12 +120,13 @@
                  SDL_AUDIO_BITSIZE(this->spec.format)));
     DEBUG_PRINT(("float=%d, ", SDL_AUDIO_ISFLOAT(this->spec.format)));
     DEBUG_PRINT(("signed=%d, ", SDL_AUDIO_ISSIGNED(this->spec.format)));
-    DEBUG_PRINT(("big endian=%d, ", SDL_AUDIO_ISBIGENDIAN(this->spec.format)));
+    DEBUG_PRINT(("big endian=%d, ",
+                 SDL_AUDIO_ISBIGENDIAN(this->spec.format)));
     DEBUG_PRINT(("channels=%d, ", this->spec.channels));
     DEBUG_PRINT(("freq=%d\n", this->spec.freq));
 
     if (this->spec.channels > 2) {
-        this->spec.channels = 2;     /* no more than stereo! */
+        this->spec.channels = 2;        /* no more than stereo! */
     }
 
     /* Check formats available */
@@ -132,7 +134,7 @@
     switch (cookie_mcsn->play) {
     case MCSN_ST:
         this->spec.channels = 1;
-        this->spec.format = AUDIO_S8;  /* FIXME: is it signed or unsigned ? */
+        this->spec.format = AUDIO_S8;   /* FIXME: is it signed or unsigned ? */
         SDL_MintAudio_AddFrequency(this, 12500, 0, 0, -1);
         break;
     case MCSN_TT:              /* Also STE, Mega STE */
@@ -170,10 +172,10 @@
                                            (1 << i) - 1, -1);
             }
         }
-        this->spec.format |= SDL_AUDIO_MASK_SIGNED;  /* Audio is always signed */
+        this->spec.format |= SDL_AUDIO_MASK_SIGNED;     /* Audio is always signed */
         if ((SDL_AUDIO_BITSIZE(this->spec.format)) == 16) {
-            this->spec.format |= SDL_AUDIO_MASK_ENDIAN;      /* Audio is always big endian */
-            this->spec.channels = 2; /* 16 bits always stereo */
+            this->spec.format |= SDL_AUDIO_MASK_ENDIAN; /* Audio is always big endian */
+            this->spec.channels = 2;    /* 16 bits always stereo */
         }
         break;
     }
@@ -194,7 +196,8 @@
                  SDL_AUDIO_BITSIZE(this->spec.format)));
     DEBUG_PRINT(("float=%d, ", SDL_AUDIO_ISFLOAT(this->spec.format)));
     DEBUG_PRINT(("signed=%d, ", SDL_AUDIO_ISSIGNED(this->spec.format)));
-    DEBUG_PRINT(("big endian=%d, ", SDL_AUDIO_ISBIGENDIAN(this->spec.format)));
+    DEBUG_PRINT(("big endian=%d, ",
+                 SDL_AUDIO_ISBIGENDIAN(this->spec.format)));
     DEBUG_PRINT(("channels=%d, ", this->spec.channels));
     DEBUG_PRINT(("freq=%d\n", this->spec.freq));
 
@@ -288,7 +291,7 @@
 
     /* Initialize all variables that we clean on shutdown */
     this->hidden = (struct SDL_PrivateAudioData *)
-                        SDL_malloc((sizeof *this->hidden));
+        SDL_malloc((sizeof *this->hidden));
     if (this->hidden == NULL) {
         SDL_OutOfMemory();
         return 0;
@@ -300,7 +303,8 @@
     /* Allocate memory for audio buffers in DMA-able RAM */
     DEBUG_PRINT((DEBUG_NAME "buffer size=%d\n", this->spec.size));
 
-    SDL_MintAudio_audiobuf[0] = Atari_SysMalloc(this->spec.size * 2, MX_STRAM);
+    SDL_MintAudio_audiobuf[0] =
+        Atari_SysMalloc(this->spec.size * 2, MX_STRAM);
     if (SDL_MintAudio_audiobuf[0] == NULL) {
         SDL_free(this->hidden);
         this->hidden = NULL;
@@ -309,7 +313,8 @@
     }
     SDL_MintAudio_audiobuf[1] = SDL_MintAudio_audiobuf[0] + this->spec.size;
     SDL_MintAudio_numbuf = 0;
-    SDL_memset(SDL_MintAudio_audiobuf[0],this->spec.silence,this->spec.size*2);
+    SDL_memset(SDL_MintAudio_audiobuf[0], this->spec.silence,
+               this->spec.size * 2);
     SDL_MintAudio_audiosize = this->spec.size;
     SDL_MintAudio_mutex = 0;
 
@@ -323,11 +328,11 @@
     /* Setup audio hardware */
     MINTMCSN_InitAudio(this);
 
-    return 1;  /* good to go. */
+    return 1;                   /* good to go. */
 }
 
 static int
-MINTMCSN_Init(SDL_AudioDriverImpl *impl)
+MINTMCSN_Init(SDL_AudioDriverImpl * impl)
 {
     unsigned long dummy = 0;