diff src/audio/nto/SDL_nto_audio.h @ 718:cbc0f7fabd1c

Date: Sat, 13 Sep 2003 15:50:43 +0300 From: "Mike Gorchak" Subject: QNX fixes improved sound code for the QNX, added workarounds for known bugs, fixed photon detect code. Update .qpg file.
author Sam Lantinga <slouken@libsdl.org>
date Sun, 21 Sep 2003 18:13:48 +0000
parents f6ffac90895c
children b8d311d90021
line wrap: on
line diff
--- a/src/audio/nto/SDL_nto_audio.h	Mon Sep 15 13:51:25 2003 +0000
+++ b/src/audio/nto/SDL_nto_audio.h	Sun Sep 21 18:13:48 2003 +0000
@@ -20,36 +20,47 @@
     slouken@libsdl.org
 */
 
-#ifndef _NTO_PCM_audio_h
-#define _NTO_PCM_audio_h
+#ifndef __SDL_NTO_AUDIO_H__
+#define __SDL_NTO_AUDIO_H__
 
 #include "SDL_sysaudio.h"
 #include <sys/asoundlib.h>
 
-/* Hidden "this" pointer for the video functions */
+/* Hidden "this" pointer for the audio functions */
 #define _THIS	SDL_AudioDevice *this
 
-struct SDL_PrivateAudioData {
-	/* The audio device handle */
-	 snd_pcm_t *audio_handle;
+struct SDL_PrivateAudioData
+{
+    /* The audio device handle */
+    int cardno;
+    int deviceno;
+    snd_pcm_t* audio_handle;
 
-	/* The audio file descriptor */
-	int audio_fd;
+    /* The audio file descriptor */
+    int audio_fd;
 
-	/* The parent process id, to detect when application quits */
-	pid_t parent;
+    /* The parent process id, to detect when application quits */
+    pid_t parent;
+
+    /* Raw mixing buffer */
+    Uint8* pcm_buf;
+    Uint32 pcm_len;
 
-	/* Raw mixing buffer */
-	Uint8 *pcm_buf;
-	int    pcm_len;
+    /* QSA parameters */
+    snd_pcm_channel_status_t cstatus;
+    snd_pcm_channel_params_t cparams;
+    snd_pcm_channel_setup_t  csetup;
 };
-#define FUDGE_TICKS	10	/* The scheduler overhead ticks per frame */
 
-/* Old variable names */
-#define audio_handle	(this->hidden->audio_handle)
-#define audio_fd		(this->hidden->audio_fd)
-#define parent			(this->hidden->parent)
-#define pcm_buf			(this->hidden->pcm_buf)
-#define pcm_len			(this->hidden->pcm_len)
+#define cardno          (this->hidden->cardno)
+#define deviceno        (this->hidden->deviceno)
+#define audio_handle    (this->hidden->audio_handle)
+#define audio_fd        (this->hidden->audio_fd)
+#define parent          (this->hidden->parent)
+#define pcm_buf         (this->hidden->pcm_buf)
+#define pcm_len         (this->hidden->pcm_len)
+#define cstatus         (this->hidden->cstatus)
+#define cparams         (this->hidden->cparams)
+#define csetup          (this->hidden->csetup)
 
-#endif /* _NTO_PCM_audio_h */
+#endif /* __SDL_NTO_AUDIO_H__ */