Moved NTO audio driver to 1.3 API. SDL-ryan-multiple-audio-device
authorRyan C. Gordon <icculus@icculus.org>
Sat, 07 Oct 2006 19:53:48 +0000
branchSDL-ryan-multiple-audio-device
changeset 3829d3171647e661
parent 3828 efdfe292bd88
child 3830 29e83f221c62
Moved NTO audio driver to 1.3 API.
src/audio/nto/SDL_nto_audio.c
src/audio/nto/SDL_nto_audio.h
     1.1 --- a/src/audio/nto/SDL_nto_audio.c	Sat Oct 07 07:56:28 2006 +0000
     1.2 +++ b/src/audio/nto/SDL_nto_audio.c	Sat Oct 07 19:53:48 2006 +0000
     1.3 @@ -69,13 +69,13 @@
     1.4      {"Vortex 8830", QSA_MMAP_WORKAROUND},
     1.5  };
     1.6  
     1.7 -/* Audio driver functions */
     1.8 -static void NTO_ThreadInit(_THIS);
     1.9 -static int NTO_OpenAudio(_THIS, SDL_AudioSpec * spec);
    1.10 -static void NTO_WaitAudio(_THIS);
    1.11 -static void NTO_PlayAudio(_THIS);
    1.12 -static Uint8 *NTO_GetAudioBuf(_THIS);
    1.13 -static void NTO_CloseAudio(_THIS);
    1.14 +
    1.15 +static inline void
    1.16 +NTO_SetError(const char *fn, int rval)
    1.17 +{
    1.18 +    SDL_SetError("NTO: %s failed: %s", fn, snd_strerror(rval));
    1.19 +}
    1.20 +
    1.21  
    1.22  /* card names check to apply the workarounds */
    1.23  static int
    1.24 @@ -84,7 +84,7 @@
    1.25      char scardname[33];
    1.26      int it;
    1.27  
    1.28 -    if (snd_card_get_name(cardno, scardname, 32) < 0) {
    1.29 +    if (snd_card_get_name(this->hidden->cardno, scardname, 32) < 0) {
    1.30          return 0;
    1.31      }
    1.32  
    1.33 @@ -102,11 +102,10 @@
    1.34  static void
    1.35  NTO_ThreadInit(_THIS)
    1.36  {
    1.37 -    int status;
    1.38      struct sched_param param;
    1.39 +    int status = SchedGet(0, 0, &param);
    1.40  
    1.41      /* increasing default 10 priority to 25 to avoid jerky sound */
    1.42 -    status = SchedGet(0, 0, &param);
    1.43      param.sched_priority = param.sched_curpriority + 15;
    1.44      status = SchedSet(0, 0, SCHED_NOCHANGE, &param);
    1.45  }
    1.46 @@ -131,111 +130,45 @@
    1.47  }
    1.48  
    1.49  static int
    1.50 -NTO_AudioAvailable(void)
    1.51 +NTO_Available(void)
    1.52  {
    1.53      /*  See if we can open a nonblocking channel.
    1.54         Return value '1' means we can.
    1.55         Return value '0' means we cannot. */
    1.56  
    1.57 -    int available;
    1.58 -    int rval;
    1.59 -    snd_pcm_t *handle;
    1.60 -
    1.61 -    available = 0;
    1.62 -    handle = NULL;
    1.63 -
    1.64 -    rval = snd_pcm_open_preferred(&handle, NULL, NULL, OPEN_FLAGS);
    1.65 -
    1.66 +    int available = 0;
    1.67 +    snd_pcm_t *handle = NULL;
    1.68 +    int rval = snd_pcm_open_preferred(&handle, NULL, NULL, OPEN_FLAGS);
    1.69      if (rval >= 0) {
    1.70          available = 1;
    1.71 -
    1.72          if ((rval = snd_pcm_close(handle)) < 0) {
    1.73 -            SDL_SetError
    1.74 -                ("NTO_AudioAvailable(): snd_pcm_close failed: %s\n",
    1.75 -                 snd_strerror(rval));
    1.76              available = 0;
    1.77          }
    1.78 -    } else {
    1.79 -        SDL_SetError
    1.80 -            ("NTO_AudioAvailable(): there are no available audio devices.\n");
    1.81      }
    1.82  
    1.83      return (available);
    1.84  }
    1.85  
    1.86 -static void
    1.87 -NTO_DeleteAudioDevice(SDL_AudioDevice * device)
    1.88 -{
    1.89 -    if ((device) && (device->hidden)) {
    1.90 -        SDL_free(device->hidden);
    1.91 -    }
    1.92 -    if (device) {
    1.93 -        SDL_free(device);
    1.94 -    }
    1.95 -}
    1.96 -
    1.97 -static SDL_AudioDevice *
    1.98 -NTO_CreateAudioDevice(int devindex)
    1.99 -{
   1.100 -    SDL_AudioDevice *this;
   1.101 -
   1.102 -    /* Initialize all variables that we clean on shutdown */
   1.103 -    this = (SDL_AudioDevice *) SDL_malloc(sizeof(SDL_AudioDevice));
   1.104 -    if (this) {
   1.105 -        SDL_memset(this, 0, sizeof(SDL_AudioDevice));
   1.106 -        this->hidden = (struct SDL_PrivateAudioData *)
   1.107 -            SDL_malloc(sizeof(struct SDL_PrivateAudioData));
   1.108 -    }
   1.109 -    if ((this == NULL) || (this->hidden == NULL)) {
   1.110 -        SDL_OutOfMemory();
   1.111 -        if (this) {
   1.112 -            SDL_free(this);
   1.113 -        }
   1.114 -        return (0);
   1.115 -    }
   1.116 -    SDL_memset(this->hidden, 0, sizeof(struct SDL_PrivateAudioData));
   1.117 -    audio_handle = NULL;
   1.118 -
   1.119 -    /* Set the function pointers */
   1.120 -    this->ThreadInit = NTO_ThreadInit;
   1.121 -    this->OpenAudio = NTO_OpenAudio;
   1.122 -    this->WaitAudio = NTO_WaitAudio;
   1.123 -    this->PlayAudio = NTO_PlayAudio;
   1.124 -    this->GetAudioBuf = NTO_GetAudioBuf;
   1.125 -    this->CloseAudio = NTO_CloseAudio;
   1.126 -
   1.127 -    this->free = NTO_DeleteAudioDevice;
   1.128 -
   1.129 -    return this;
   1.130 -}
   1.131 -
   1.132 -AudioBootStrap QNXNTOAUDIO_bootstrap = {
   1.133 -    DRIVER_NAME, "QNX6 QSA-NTO Audio",
   1.134 -    NTO_AudioAvailable,
   1.135 -    NTO_CreateAudioDevice,
   1.136 -    0
   1.137 -};
   1.138  
   1.139  /* This function waits until it is possible to write a full sound buffer */
   1.140  static void
   1.141 -NTO_WaitAudio(_THIS)
   1.142 +NTO_WaitDevice(_THIS)
   1.143  {
   1.144      fd_set wfds;
   1.145      int selectret;
   1.146  
   1.147      FD_ZERO(&wfds);
   1.148 -    FD_SET(audio_fd, &wfds);
   1.149 +    FD_SET(this->hidden->audio_fd, &wfds);
   1.150  
   1.151      do {
   1.152 -        selectret = select(audio_fd + 1, NULL, &wfds, NULL, NULL);
   1.153 +        selectret = select(this->hidden->audio_fd+1, NULL, &wfds, NULL, NULL);
   1.154          switch (selectret) {
   1.155          case -1:
   1.156          case 0:
   1.157 -            SDL_SetError("NTO_WaitAudio(): select() failed: %s\n",
   1.158 -                         strerror(errno));
   1.159 +            SDL_SetError("NTO: select() failed: %s\n", strerror(errno));
   1.160              return;
   1.161          default:
   1.162 -            if (FD_ISSET(audio_fd, &wfds)) {
   1.163 +            if (FD_ISSET(this->hidden->audio_fd, &wfds)) {
   1.164                  return;
   1.165              }
   1.166              break;
   1.167 @@ -245,22 +178,24 @@
   1.168  }
   1.169  
   1.170  static void
   1.171 -NTO_PlayAudio(_THIS)
   1.172 +NTO_PlayDevice(_THIS)
   1.173  {
   1.174 +    snd_pcm_channel_status_t cstatus;
   1.175      int written, rval;
   1.176      int towrite;
   1.177      void *pcmbuffer;
   1.178  
   1.179 -    if (!this->enabled) {
   1.180 +    if ((!this->enabled) || (!this->hidden)) {
   1.181          return;
   1.182      }
   1.183  
   1.184      towrite = this->spec.size;
   1.185 -    pcmbuffer = pcm_buf;
   1.186 +    pcmbuffer = this->hidden->pcm_buf;
   1.187  
   1.188      /* Write the audio data, checking for EAGAIN (buffer full) and underrun */
   1.189      do {
   1.190 -        written = snd_pcm_plugin_write(audio_handle, pcm_buf, towrite);
   1.191 +        written = snd_pcm_plugin_write(this->hidden->audio_handle,
   1.192 +                                       pcmbuffer, towrite);
   1.193          if (written != towrite) {
   1.194              if ((errno == EAGAIN) || (errno == EWOULDBLOCK)) {
   1.195                  /* Let a little CPU time go by and try to write again */
   1.196 @@ -269,33 +204,28 @@
   1.197                  towrite -= written;
   1.198                  pcmbuffer += written * this->spec.channels;
   1.199                  continue;
   1.200 -            } else {
   1.201 -                if ((errno == EINVAL) || (errno == EIO)) {
   1.202 -                    SDL_memset(&cstatus, 0, sizeof(cstatus));
   1.203 -                    cstatus.channel = SND_PCM_CHANNEL_PLAYBACK;
   1.204 -                    if ((rval =
   1.205 -                         snd_pcm_plugin_status(audio_handle, &cstatus)) < 0) {
   1.206 -                        SDL_SetError
   1.207 -                            ("NTO_PlayAudio(): snd_pcm_plugin_status failed: %s\n",
   1.208 -                             snd_strerror(rval));
   1.209 +            } else if ((errno == EINVAL) || (errno == EIO)) {
   1.210 +                SDL_memset(&cstatus, 0, sizeof (cstatus));
   1.211 +                cstatus.channel = SND_PCM_CHANNEL_PLAYBACK;
   1.212 +                rval = snd_pcm_plugin_status(this->hidden->audio_handle,
   1.213 +                                             &cstatus);
   1.214 +                if (rval < 0) {
   1.215 +                    NTO_SetError("snd_pcm_plugin_status", rval);
   1.216 +                    return;
   1.217 +                }
   1.218 +
   1.219 +                if ( (cstatus.status == SND_PCM_STATUS_UNDERRUN) ||
   1.220 +                     (cstatus.status == SND_PCM_STATUS_READY)) {
   1.221 +                    rval = snd_pcm_plugin_prepare(this->hidden->audio_handle,
   1.222 +                                                   SND_PCM_CHANNEL_PLAYBACK);
   1.223 +                    if (rval < 0) {
   1.224 +                        NTO_SetError("snd_pcm_plugin_prepare", rval);
   1.225                          return;
   1.226                      }
   1.227 -                    if ((cstatus.status == SND_PCM_STATUS_UNDERRUN)
   1.228 -                        || (cstatus.status == SND_PCM_STATUS_READY)) {
   1.229 -                        if ((rval =
   1.230 -                             snd_pcm_plugin_prepare(audio_handle,
   1.231 -                                                    SND_PCM_CHANNEL_PLAYBACK))
   1.232 -                            < 0) {
   1.233 -                            SDL_SetError
   1.234 -                                ("NTO_PlayAudio(): snd_pcm_plugin_prepare failed: %s\n",
   1.235 -                                 snd_strerror(rval));
   1.236 -                            return;
   1.237 -                        }
   1.238 -                    }
   1.239 -                    continue;
   1.240 -                } else {
   1.241 -                    return;
   1.242                  }
   1.243 +                continue;
   1.244 +            } else {
   1.245 +                return;
   1.246              }
   1.247          } else {
   1.248              /* we wrote all remaining data */
   1.249 @@ -309,77 +239,74 @@
   1.250      if (towrite != 0) {
   1.251          this->enabled = 0;
   1.252      }
   1.253 -
   1.254 -    return;
   1.255  }
   1.256  
   1.257  static Uint8 *
   1.258 -NTO_GetAudioBuf(_THIS)
   1.259 +NTO_GetDeviceBuf(_THIS)
   1.260  {
   1.261 -    return pcm_buf;
   1.262 +    return this->hidden->pcm_buf;
   1.263  }
   1.264  
   1.265  static void
   1.266 -NTO_CloseAudio(_THIS)
   1.267 +NTO_CloseDevice(_THIS)
   1.268  {
   1.269 -    int rval;
   1.270 -
   1.271 -    this->enabled = 0;
   1.272 -
   1.273 -    if (audio_handle != NULL) {
   1.274 -        if ((rval =
   1.275 -             snd_pcm_plugin_flush(audio_handle,
   1.276 -                                  SND_PCM_CHANNEL_PLAYBACK)) < 0) {
   1.277 -            SDL_SetError
   1.278 -                ("NTO_CloseAudio(): snd_pcm_plugin_flush failed: %s\n",
   1.279 -                 snd_strerror(rval));
   1.280 -            return;
   1.281 +    if (this->hidden != NULL) {
   1.282 +        if (this->hidden->audio_handle != NULL) {
   1.283 +            snd_pcm_plugin_flush(this->hidden->audio_handle,
   1.284 +                                 SND_PCM_CHANNEL_PLAYBACK);
   1.285 +            snd_pcm_close(this->hidden->audio_handle);
   1.286 +            this->hidden->audio_handle = NULL;
   1.287          }
   1.288 -        if ((rval = snd_pcm_close(audio_handle)) < 0) {
   1.289 -            SDL_SetError("NTO_CloseAudio(): snd_pcm_close failed: %s\n",
   1.290 -                         snd_strerror(rval));
   1.291 -            return;
   1.292 +        if (this->hidden->pcm_buf != NULL) {
   1.293 +            SDL_FreeAudioMem(this->hidden->pcm_buf);
   1.294 +            this->hidden->pcm_buf = NULL;
   1.295          }
   1.296 -        audio_handle = NULL;
   1.297 +        SDL_free(this->hidden);
   1.298 +        this->hidden = NULL;
   1.299      }
   1.300  }
   1.301  
   1.302  static int
   1.303 -NTO_OpenAudio(_THIS, SDL_AudioSpec * spec)
   1.304 +NTO_OpenDevice(_THIS, const char *devname, int iscapture)
   1.305  {
   1.306 -    int rval;
   1.307 -    int format;
   1.308 -    SDL_AudioFormat test_format;
   1.309 -    int found;
   1.310 +    int rval = 0;
   1.311 +    int format = 0;
   1.312 +    SDL_AudioFormat test_format = 0;
   1.313 +    int found = 0;
   1.314 +    snd_pcm_channel_setup_t csetup;
   1.315 +    snd_pcm_channel_params_t cparams;
   1.316  
   1.317 -    audio_handle = NULL;
   1.318 -    this->enabled = 0;
   1.319 -
   1.320 -    if (pcm_buf != NULL) {
   1.321 -        SDL_FreeAudioMem(pcm_buf);
   1.322 -        pcm_buf = NULL;
   1.323 +    /* Initialize all variables that we clean on shutdown */
   1.324 +    this->hidden = (struct SDL_PrivateAudioData *)
   1.325 +                        SDL_malloc((sizeof *this->hidden));
   1.326 +    if (this->hidden == NULL) {
   1.327 +        SDL_OutOfMemory();
   1.328 +        return 0;
   1.329      }
   1.330 +    SDL_memset(this->hidden, 0, (sizeof *this->hidden));
   1.331  
   1.332      /* initialize channel transfer parameters to default */
   1.333      NTO_InitAudioParams(&cparams);
   1.334  
   1.335      /* Open the audio device */
   1.336 -    rval =
   1.337 -        snd_pcm_open_preferred(&audio_handle, &cardno, &deviceno, OPEN_FLAGS);
   1.338 +    rval = snd_pcm_open_preferred(&this->hidden->audio_handle,
   1.339 +                                  &this->hidden->cardno,
   1.340 +                                  &this->hidden->deviceno, OPEN_FLAGS);
   1.341 +
   1.342      if (rval < 0) {
   1.343 -        SDL_SetError("NTO_OpenAudio(): snd_pcm_open failed: %s\n",
   1.344 -                     snd_strerror(rval));
   1.345 -        return (-1);
   1.346 +        NTO_CloseDevice(this);
   1.347 +        NTO_SetError("snd_pcm_open", rval);
   1.348 +        return 0;
   1.349      }
   1.350  
   1.351      if (!NTO_CheckBuggyCards(this, QSA_MMAP_WORKAROUND)) {
   1.352          /* enable count status parameter */
   1.353 -        if ((rval =
   1.354 -             snd_pcm_plugin_set_disable(audio_handle,
   1.355 -                                        PLUGIN_DISABLE_MMAP)) < 0) {
   1.356 -            SDL_SetError("snd_pcm_plugin_set_disable failed: %s\n",
   1.357 -                         snd_strerror(rval));
   1.358 -            return (-1);
   1.359 +        rval = snd_pcm_plugin_set_disable(this->hidden->audio_handle,
   1.360 +                                          PLUGIN_DISABLE_MMAP);
   1.361 +        if (rval < 0) {
   1.362 +            NTO_CloseDevice(this);
   1.363 +            NTO_SetError("snd_pcm_plugin_set_disable", rval);
   1.364 +            return 0;
   1.365          }
   1.366      }
   1.367  
   1.368 @@ -388,7 +315,7 @@
   1.369      /* can't use format as SND_PCM_SFMT_U8 = 0 in nto */
   1.370      found = 0;
   1.371  
   1.372 -    for (test_format = SDL_FirstAudioFormat(spec->format); !found;) {
   1.373 +    for (test_format = SDL_FirstAudioFormat(this->spec.format); !found;) {
   1.374          /* if match found set format to equivalent ALSA format */
   1.375          switch (test_format) {
   1.376          case AUDIO_U8:
   1.377 @@ -442,86 +369,88 @@
   1.378  
   1.379      /* assumes test_format not 0 on success */
   1.380      if (test_format == 0) {
   1.381 -        SDL_SetError
   1.382 -            ("NTO_OpenAudio(): Couldn't find any hardware audio formats");
   1.383 -        return (-1);
   1.384 +        NTO_CloseDevice(this);
   1.385 +        SDL_SetError("NTO: Couldn't find any hardware audio formats");
   1.386 +        return 0;
   1.387      }
   1.388  
   1.389 -    spec->format = test_format;
   1.390 +    this->spec.format = test_format;
   1.391  
   1.392      /* Set the audio format */
   1.393      cparams.format.format = format;
   1.394  
   1.395      /* Set mono or stereo audio (currently only two channels supported) */
   1.396 -    cparams.format.voices = spec->channels;
   1.397 +    cparams.format.voices = this->spec.channels;
   1.398  
   1.399      /* Set rate */
   1.400 -    cparams.format.rate = spec->freq;
   1.401 +    cparams.format.rate = this->spec.freq;
   1.402  
   1.403      /* Setup the transfer parameters according to cparams */
   1.404 -    rval = snd_pcm_plugin_params(audio_handle, &cparams);
   1.405 +    rval = snd_pcm_plugin_params(this->hidden->audio_handle, &cparams);
   1.406      if (rval < 0) {
   1.407 -        SDL_SetError
   1.408 -            ("NTO_OpenAudio(): snd_pcm_channel_params failed: %s\n",
   1.409 -             snd_strerror(rval));
   1.410 -        return (-1);
   1.411 +        NTO_CloseDevice(this);
   1.412 +        NTO_SetError("snd_pcm_channel_params", rval);
   1.413 +        return 0;
   1.414      }
   1.415  
   1.416      /* Make sure channel is setup right one last time */
   1.417 -    SDL_memset(&csetup, 0x00, sizeof(csetup));
   1.418 +    SDL_memset(&csetup, '\0', sizeof (csetup));
   1.419      csetup.channel = SND_PCM_CHANNEL_PLAYBACK;
   1.420 -    if (snd_pcm_plugin_setup(audio_handle, &csetup) < 0) {
   1.421 -        SDL_SetError("NTO_OpenAudio(): Unable to setup playback channel\n");
   1.422 -        return -1;
   1.423 +    if (snd_pcm_plugin_setup(this->hidden->audio_handle, &csetup) < 0) {
   1.424 +        NTO_CloseDevice(this);
   1.425 +        SDL_SetError("NTO: Unable to setup playback channel\n");
   1.426 +        return 0;
   1.427      }
   1.428  
   1.429 -
   1.430      /* Calculate the final parameters for this audio specification */
   1.431 -    SDL_CalculateAudioSpec(spec);
   1.432 +    SDL_CalculateAudioSpec(&this->spec);
   1.433  
   1.434 -    pcm_len = spec->size;
   1.435 +    this->hidden->pcm_len = this->spec.size;
   1.436  
   1.437 -    if (pcm_len == 0) {
   1.438 -        pcm_len =
   1.439 -            csetup.buf.block.frag_size * spec->channels *
   1.440 +    if (this->hidden->pcm_len == 0) {
   1.441 +        this->hidden->pcm_len =
   1.442 +            csetup.buf.block.frag_size * this->spec.channels *
   1.443              (snd_pcm_format_width(format) / 8);
   1.444      }
   1.445  
   1.446 -    /* Allocate memory to the audio buffer and initialize with silence (Note that
   1.447 -       buffer size must be a multiple of fragment size, so find closest multiple)
   1.448 +    /*
   1.449 +     * Allocate memory to the audio buffer and initialize with silence
   1.450 +     *  (Note that buffer size must be a multiple of fragment size, so find
   1.451 +     *  closest multiple)
   1.452       */
   1.453 -    pcm_buf = (Uint8 *) SDL_AllocAudioMem(pcm_len);
   1.454 -    if (pcm_buf == NULL) {
   1.455 -        SDL_SetError("NTO_OpenAudio(): pcm buffer allocation failed\n");
   1.456 -        return (-1);
   1.457 +    this->hidden->pcm_buf = (Uint8 *) SDL_AllocAudioMem(this->hidden->pcm_len);
   1.458 +    if (this->hidden->pcm_buf == NULL) {
   1.459 +        NTO_CloseDevice(this);
   1.460 +        SDL_OutOfMemory();
   1.461 +        return 0;
   1.462      }
   1.463 -    SDL_memset(pcm_buf, spec->silence, pcm_len);
   1.464 +    SDL_memset(this->hidden->pcm_buf,this->spec.silence,this->hidden->pcm_len);
   1.465  
   1.466      /* get the file descriptor */
   1.467 -    if ((audio_fd =
   1.468 -         snd_pcm_file_descriptor(audio_handle,
   1.469 -                                 SND_PCM_CHANNEL_PLAYBACK)) < 0) {
   1.470 -        SDL_SetError
   1.471 -            ("NTO_OpenAudio(): snd_pcm_file_descriptor failed with error code: %s\n",
   1.472 -             snd_strerror(rval));
   1.473 -        return (-1);
   1.474 +    this->hidden->audio_fd = snd_pcm_file_descriptor(this->hidden->audio_handle,
   1.475 +                                                     SND_PCM_CHANNEL_PLAYBACK);
   1.476 +    if (this->hidden->audio_fd < 0) {
   1.477 +        NTO_CloseDevice(this);
   1.478 +        NTO_SetError("snd_pcm_file_descriptor", rval);
   1.479 +        return 0;
   1.480      }
   1.481  
   1.482      /* Trigger audio playback */
   1.483 -    rval = snd_pcm_plugin_prepare(audio_handle, SND_PCM_CHANNEL_PLAYBACK);
   1.484 +    rval = snd_pcm_plugin_prepare(this->hidden->audio_handle,
   1.485 +                                  SND_PCM_CHANNEL_PLAYBACK);
   1.486      if (rval < 0) {
   1.487 -        SDL_SetError("snd_pcm_plugin_prepare failed: %s\n",
   1.488 -                     snd_strerror(rval));
   1.489 -        return (-1);
   1.490 +        NTO_CloseDevice(this);
   1.491 +        NTO_SetError("snd_pcm_plugin_prepare", rval);
   1.492 +        return 0;
   1.493      }
   1.494  
   1.495 -    this->enabled = 1;
   1.496 -
   1.497 -    /* Get the parent process id (we're the parent of the audio thread) */
   1.498 -    parent = getpid();
   1.499 -
   1.500      /* We're really ready to rock and roll. :-) */
   1.501 -    return (0);
   1.502 +    return 1;
   1.503  }
   1.504  
   1.505 +AudioBootStrap QNXNTOAUDIO_bootstrap = {
   1.506 +    DRIVER_NAME, "QNX6 QSA-NTO Audio",
   1.507 +    NTO_AudioAvailable, NTO_Init, 0
   1.508 +};
   1.509 +
   1.510  /* vi: set ts=4 sw=4 expandtab: */
     2.1 --- a/src/audio/nto/SDL_nto_audio.h	Sat Oct 07 07:56:28 2006 +0000
     2.2 +++ b/src/audio/nto/SDL_nto_audio.h	Sat Oct 07 19:53:48 2006 +0000
     2.3 @@ -47,23 +47,7 @@
     2.4      /* Raw mixing buffer */
     2.5      Uint8 *pcm_buf;
     2.6      Uint32 pcm_len;
     2.7 -
     2.8 -    /* QSA parameters */
     2.9 -    snd_pcm_channel_status_t cstatus;
    2.10 -    snd_pcm_channel_params_t cparams;
    2.11 -    snd_pcm_channel_setup_t csetup;
    2.12  };
    2.13  
    2.14 -#define cardno          (this->hidden->cardno)
    2.15 -#define deviceno        (this->hidden->deviceno)
    2.16 -#define audio_handle    (this->hidden->audio_handle)
    2.17 -#define audio_fd        (this->hidden->audio_fd)
    2.18 -#define parent          (this->hidden->parent)
    2.19 -#define pcm_buf         (this->hidden->pcm_buf)
    2.20 -#define pcm_len         (this->hidden->pcm_len)
    2.21 -#define cstatus         (this->hidden->cstatus)
    2.22 -#define cparams         (this->hidden->cparams)
    2.23 -#define csetup          (this->hidden->csetup)
    2.24 -
    2.25  #endif /* __SDL_NTO_AUDIO_H__ */
    2.26  /* vi: set ts=4 sw=4 expandtab: */