comparison src/audio/dma/SDL_dmaaudio.h @ 1895:c121d94672cb

SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
author Sam Lantinga <slouken@libsdl.org>
date Mon, 10 Jul 2006 21:04:37 +0000
parents d910939febfa
children 5f6550e5184f 9dc81c6acaf5
comparison
equal deleted inserted replaced
1894:c69cee13dd76 1895:c121d94672cb
27 #include "../SDL_sysaudio.h" 27 #include "../SDL_sysaudio.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 file descriptor for the audio device */ 33 {
34 int audio_fd; 34 /* The file descriptor for the audio device */
35 int audio_fd;
35 36
36 /* The parent process id, to detect when application quits */ 37 /* The parent process id, to detect when application quits */
37 pid_t parent; 38 pid_t parent;
38 39
39 /* Raw mixing buffer */ 40 /* Raw mixing buffer */
40 Uint8 *dma_buf; 41 Uint8 *dma_buf;
41 int dma_len; 42 int dma_len;
42 int num_buffers; 43 int num_buffers;
43 44
44 /* Support for audio timing using a timer, in addition to select() */ 45 /* Support for audio timing using a timer, in addition to select() */
45 float frame_ticks; 46 float frame_ticks;
46 float next_frame; 47 float next_frame;
47 }; 48 };
48 #define FUDGE_TICKS 10 /* The scheduler overhead ticks per frame */ 49 #define FUDGE_TICKS 10 /* The scheduler overhead ticks per frame */
49 50
50 /* Old variable names */ 51 /* Old variable names */
51 #define audio_fd (this->hidden->audio_fd) 52 #define audio_fd (this->hidden->audio_fd)
52 #define parent (this->hidden->parent) 53 #define parent (this->hidden->parent)
53 #define dma_buf (this->hidden->dma_buf) 54 #define dma_buf (this->hidden->dma_buf)
55 #define num_buffers (this->hidden->num_buffers) 56 #define num_buffers (this->hidden->num_buffers)
56 #define frame_ticks (this->hidden->frame_ticks) 57 #define frame_ticks (this->hidden->frame_ticks)
57 #define next_frame (this->hidden->next_frame) 58 #define next_frame (this->hidden->next_frame)
58 59
59 #endif /* _SDL_dspaudio_h */ 60 #endif /* _SDL_dspaudio_h */
61 /* vi: set ts=4 sw=4 expandtab: */