src/audio/nas/SDL_nasaudio.c
changeset 2060 866052b01ee5
parent 2049 5f6550e5184f
child 2859 99210400e8b9
     1.1 --- a/src/audio/nas/SDL_nasaudio.c	Sat Oct 28 16:41:54 2006 +0000
     1.2 +++ b/src/audio/nas/SDL_nasaudio.c	Sat Oct 28 16:48:03 2006 +0000
     1.3 @@ -43,19 +43,19 @@
     1.4  static struct SDL_PrivateAudioData *this2 = NULL;
     1.5  
     1.6  
     1.7 -static void (*NAS_AuCloseServer)(AuServer *);
     1.8 -static void (*NAS_AuNextEvent)(AuServer *, AuBool, AuEvent *);
     1.9 -static AuBool (*NAS_AuDispatchEvent)(AuServer *, AuEvent *);
    1.10 -static AuFlowID (*NAS_AuCreateFlow)(AuServer *, AuStatus *);
    1.11 -static void (*NAS_AuStartFlow)(AuServer *, AuFlowID, AuStatus *);
    1.12 +static void (*NAS_AuCloseServer) (AuServer *);
    1.13 +static void (*NAS_AuNextEvent) (AuServer *, AuBool, AuEvent *);
    1.14 +static AuBool(*NAS_AuDispatchEvent) (AuServer *, AuEvent *);
    1.15 +static AuFlowID(*NAS_AuCreateFlow) (AuServer *, AuStatus *);
    1.16 +static void (*NAS_AuStartFlow) (AuServer *, AuFlowID, AuStatus *);
    1.17  static void (*NAS_AuSetElements)
    1.18 -    (AuServer *, AuFlowID, AuBool, int, AuElement *, AuStatus *);
    1.19 +  (AuServer *, AuFlowID, AuBool, int, AuElement *, AuStatus *);
    1.20  static void (*NAS_AuWriteElement)
    1.21 -    (AuServer *, AuFlowID, int, AuUint32, AuPointer, AuBool, AuStatus *);
    1.22 +  (AuServer *, AuFlowID, int, AuUint32, AuPointer, AuBool, AuStatus *);
    1.23  static AuServer *(*NAS_AuOpenServer)
    1.24 -    (_AuConst char *, int, _AuConst char *, int, _AuConst char *, char **);
    1.25 +  (_AuConst char *, int, _AuConst char *, int, _AuConst char *, char **);
    1.26  static AuEventHandlerRec *(*NAS_AuRegisterEventHandler)
    1.27 -    (AuServer *, AuMask, int, AuID, AuEventHandlerCallback, AuPointer);
    1.28 +  (AuServer *, AuMask, int, AuID, AuEventHandlerCallback, AuPointer);
    1.29  
    1.30  
    1.31  #ifdef SDL_AUDIO_DRIVER_NAS_DYNAMIC
    1.32 @@ -80,7 +80,8 @@
    1.33  #define SDL_NAS_SYM(x) NAS_##x = x
    1.34  #endif
    1.35  
    1.36 -static int load_nas_syms(void)
    1.37 +static int
    1.38 +load_nas_syms(void)
    1.39  {
    1.40      SDL_NAS_SYM(AuCloseServer);
    1.41      SDL_NAS_SYM(AuNextEvent);
    1.42 @@ -93,6 +94,7 @@
    1.43      SDL_NAS_SYM(AuRegisterEventHandler);
    1.44      return 0;
    1.45  }
    1.46 +
    1.47  #undef SDL_NAS_SYM
    1.48  
    1.49  #ifdef SDL_AUDIO_DRIVER_NAS_DYNAMIC
    1.50 @@ -120,7 +122,7 @@
    1.51              SDL_strlcpy(err, origerr, len);
    1.52              retval = -1;
    1.53              SDL_SetError("NAS: SDL_LoadObject('%s') failed: %s\n",
    1.54 -                          nas_library, err);
    1.55 +                         nas_library, err);
    1.56          } else {
    1.57              retval = load_nas_syms();
    1.58              if (retval < 0) {
    1.59 @@ -175,7 +177,8 @@
    1.60  
    1.61      /* Write the audio data */
    1.62      NAS_AuWriteElement(this->hidden->aud, this->hidden->flow, 0,
    1.63 -                   this->hidden->mixlen, this->hidden->mixbuf, AuFalse, NULL);
    1.64 +                       this->hidden->mixlen, this->hidden->mixbuf, AuFalse,
    1.65 +                       NULL);
    1.66  
    1.67      this->hidden->written += this->hidden->mixlen;
    1.68  
    1.69 @@ -289,7 +292,7 @@
    1.70  
    1.71      /* Initialize all variables that we clean on shutdown */
    1.72      this->hidden = (struct SDL_PrivateAudioData *)
    1.73 -                        SDL_malloc((sizeof *this->hidden));
    1.74 +        SDL_malloc((sizeof *this->hidden));
    1.75      if (this->hidden == NULL) {
    1.76          SDL_OutOfMemory();
    1.77          return 0;
    1.78 @@ -339,12 +342,13 @@
    1.79  
    1.80      this2 = this->hidden;
    1.81  
    1.82 -    AuMakeElementImportClient(elms,this->spec.freq,format,this->spec.channels,
    1.83 -                              AuTrue, buffer_size, buffer_size / 4, 0, NULL);
    1.84 +    AuMakeElementImportClient(elms, this->spec.freq, format,
    1.85 +                              this->spec.channels, AuTrue, buffer_size,
    1.86 +                              buffer_size / 4, 0, NULL);
    1.87      AuMakeElementExportDevice(elms + 1, 0, this->hidden->dev, this->spec.freq,
    1.88                                AuUnlimitedSamples, 0, NULL);
    1.89 -    NAS_AuSetElements(this->hidden->aud, this->hidden->flow,
    1.90 -                      AuTrue, 2, elms, NULL);
    1.91 +    NAS_AuSetElements(this->hidden->aud, this->hidden->flow, AuTrue, 2, elms,
    1.92 +                      NULL);
    1.93      NAS_AuRegisterEventHandler(this->hidden->aud, AuEventHandlerIDMask, 0,
    1.94                                 this->hidden->flow, event_handler,
    1.95                                 (AuPointer) NULL);
    1.96 @@ -372,7 +376,7 @@
    1.97  }
    1.98  
    1.99  static int
   1.100 -NAS_Init(SDL_AudioDriverImpl *impl)
   1.101 +NAS_Init(SDL_AudioDriverImpl * impl)
   1.102  {
   1.103      if (LoadNASLibrary() < 0) {
   1.104          return 0;
   1.105 @@ -392,7 +396,7 @@
   1.106      impl->GetDeviceBuf = NAS_GetDeviceBuf;
   1.107      impl->CloseDevice = NAS_CloseDevice;
   1.108      impl->Deinitialize = NAS_Deinitialize;
   1.109 -    impl->OnlyHasDefaultOutputDevice = 1;  /* !!! FIXME: is this true? */
   1.110 +    impl->OnlyHasDefaultOutputDevice = 1;       /* !!! FIXME: is this true? */
   1.111  
   1.112      return 1;
   1.113  }