Mercurial > sdl-ios-xcode
comparison src/audio/alsa/SDL_alsa_audio.h @ 354:30935e76acb5
Updated ALSA audio support for ALSA 0.9
author | Sam Lantinga <slouken@libsdl.org> |
---|---|
date | Mon, 15 Apr 2002 07:38:54 +0000 |
parents | f6ffac90895c |
children | 4f46fee887fe |
comparison
equal
deleted
inserted
replaced
353:d47637068e52 | 354:30935e76acb5 |
---|---|
22 | 22 |
23 #ifndef _ALSA_PCM_audio_h | 23 #ifndef _ALSA_PCM_audio_h |
24 #define _ALSA_PCM_audio_h | 24 #define _ALSA_PCM_audio_h |
25 | 25 |
26 #include "SDL_sysaudio.h" | 26 #include "SDL_sysaudio.h" |
27 #include <sys/asoundlib.h> | 27 #include <alsa/asoundlib.h> |
28 | 28 |
29 /* Hidden "this" pointer for the video functions */ | 29 /* Hidden "this" pointer for the video 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 /* The audio device handle */ |
34 snd_pcm_t *audio_handle; | 34 snd_pcm_t *pcm_handle; |
35 | |
36 /* The audio file descriptor */ | |
37 int audio_fd; | |
38 | 35 |
39 /* The parent process id, to detect when application quits */ | 36 /* The parent process id, to detect when application quits */ |
40 pid_t parent; | 37 pid_t parent; |
41 | 38 |
42 /* Raw mixing buffer */ | 39 /* Raw mixing buffer */ |
43 Uint8 *pcm_buf; | 40 Uint8 *mixbuf; |
44 int pcm_len; | 41 int mixlen; |
45 | |
46 /* Support for audio timing using a timer, in addition to select() */ | |
47 float frame_ticks; | |
48 float next_frame; | |
49 }; | 42 }; |
50 #define FUDGE_TICKS 10 /* The scheduler overhead ticks per frame */ | |
51 | 43 |
52 /* Old variable names */ | 44 /* Old variable names */ |
53 #define audio_handle (this->hidden->audio_handle) | 45 #define pcm_handle (this->hidden->pcm_handle) |
54 #define audio_fd (this->hidden->audio_fd) | |
55 #define parent (this->hidden->parent) | 46 #define parent (this->hidden->parent) |
56 #define pcm_buf (this->hidden->pcm_buf) | 47 #define mixbuf (this->hidden->mixbuf) |
57 #define pcm_len (this->hidden->pcm_len) | 48 #define mixlen (this->hidden->mixlen) |
58 #define frame_ticks (this->hidden->frame_ticks) | |
59 #define next_frame (this->hidden->next_frame) | |
60 | 49 |
61 #endif /* _ALSA_PCM_audio_h */ | 50 #endif /* _ALSA_PCM_audio_h */ |