comparison src/audio/SDL_sysaudio.h @ 2716:f8f68f47285a

Final merge of Google Summer of Code 2008 work... Audio Ideas - Resampling and Pitch Shifting by Aaron Wishnick, mentored by Ryan C. Gordon
author Sam Lantinga <slouken@libsdl.org>
date Mon, 25 Aug 2008 15:08:59 +0000
parents 866052b01ee5
children 99210400e8b9
comparison
equal deleted inserted replaced
2715:336b604ec15b 2716:f8f68f47285a
67 67
68 SDL_AudioDriverImpl impl; 68 SDL_AudioDriverImpl impl;
69 } SDL_AudioDriver; 69 } SDL_AudioDriver;
70 70
71 71
72 /* Streamer */
73 typedef struct
74 {
75 Uint8 *buffer;
76 int max_len; /* the maximum length in bytes */
77 int read_pos, write_pos; /* the position of the write and read heads in bytes */
78 } SDL_AudioStreamer;
79
80
72 /* Define the SDL audio driver structure */ 81 /* Define the SDL audio driver structure */
73 struct SDL_AudioDevice 82 struct SDL_AudioDevice
74 { 83 {
75 /* * * */ 84 /* * * */
76 /* Data common to all devices */ 85 /* Data common to all devices */
78 /* The current audio specification (shared with audio thread) */ 87 /* The current audio specification (shared with audio thread) */
79 SDL_AudioSpec spec; 88 SDL_AudioSpec spec;
80 89
81 /* An audio conversion block for audio format emulation */ 90 /* An audio conversion block for audio format emulation */
82 SDL_AudioCVT convert; 91 SDL_AudioCVT convert;
92
93 /* The streamer, if sample rate conversion necessitates it */
94 int use_streamer;
95 SDL_AudioStreamer streamer;
83 96
84 /* Current state flags */ 97 /* Current state flags */
85 int iscapture; 98 int iscapture;
86 int enabled; 99 int enabled;
87 int paused; 100 int paused;