comparison 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
comparison
equal deleted inserted replaced
717:42ed44b2c8b6 718:cbc0f7fabd1c
18 18
19 Sam Lantinga 19 Sam Lantinga
20 slouken@libsdl.org 20 slouken@libsdl.org
21 */ 21 */
22 22
23 #ifndef _NTO_PCM_audio_h 23 #ifndef __SDL_NTO_AUDIO_H__
24 #define _NTO_PCM_audio_h 24 #define __SDL_NTO_AUDIO_H__
25 25
26 #include "SDL_sysaudio.h" 26 #include "SDL_sysaudio.h"
27 #include <sys/asoundlib.h> 27 #include <sys/asoundlib.h>
28 28
29 /* Hidden "this" pointer for the video functions */ 29 /* Hidden "this" pointer for the audio functions */
30 #define _THIS SDL_AudioDevice *this 30 #define _THIS SDL_AudioDevice *this
31 31
32 struct SDL_PrivateAudioData { 32 struct SDL_PrivateAudioData
33 /* The audio device handle */ 33 {
34 snd_pcm_t *audio_handle; 34 /* The audio device handle */
35 int cardno;
36 int deviceno;
37 snd_pcm_t* audio_handle;
35 38
36 /* The audio file descriptor */ 39 /* The audio file descriptor */
37 int audio_fd; 40 int audio_fd;
38 41
39 /* The parent process id, to detect when application quits */ 42 /* The parent process id, to detect when application quits */
40 pid_t parent; 43 pid_t parent;
41 44
42 /* Raw mixing buffer */ 45 /* Raw mixing buffer */
43 Uint8 *pcm_buf; 46 Uint8* pcm_buf;
44 int pcm_len; 47 Uint32 pcm_len;
48
49 /* QSA parameters */
50 snd_pcm_channel_status_t cstatus;
51 snd_pcm_channel_params_t cparams;
52 snd_pcm_channel_setup_t csetup;
45 }; 53 };
46 #define FUDGE_TICKS 10 /* The scheduler overhead ticks per frame */
47 54
48 /* Old variable names */ 55 #define cardno (this->hidden->cardno)
49 #define audio_handle (this->hidden->audio_handle) 56 #define deviceno (this->hidden->deviceno)
50 #define audio_fd (this->hidden->audio_fd) 57 #define audio_handle (this->hidden->audio_handle)
51 #define parent (this->hidden->parent) 58 #define audio_fd (this->hidden->audio_fd)
52 #define pcm_buf (this->hidden->pcm_buf) 59 #define parent (this->hidden->parent)
53 #define pcm_len (this->hidden->pcm_len) 60 #define pcm_buf (this->hidden->pcm_buf)
61 #define pcm_len (this->hidden->pcm_len)
62 #define cstatus (this->hidden->cstatus)
63 #define cparams (this->hidden->cparams)
64 #define csetup (this->hidden->csetup)
54 65
55 #endif /* _NTO_PCM_audio_h */ 66 #endif /* __SDL_NTO_AUDIO_H__ */