comparison src/audio/SDL_sysaudio.h @ 2665:f39a056aec8b gsoc2008_audio_resampling

More streamer work.
author Aaron Wishnick <schnarf@gmail.com>
date Tue, 12 Aug 2008 01:03:05 +0000
parents 866052b01ee5
children e12ccc6c9576
comparison
equal deleted inserted replaced
2664:344c8da164f4 2665:f39a056aec8b
66 const char *desc; 66 const char *desc;
67 67
68 SDL_AudioDriverImpl impl; 68 SDL_AudioDriverImpl impl;
69 } SDL_AudioDriver; 69 } SDL_AudioDriver;
70 70
71 /* Streamer */
72 typedef struct
73 {
74 Uint8 *buffer;
75 int max_len; /* the maximum length in bytes */
76 int read_pos, write_pos; /* the position of the write and read heads in bytes */
77 } SDL_AudioStreamer;
78
71 79
72 /* Define the SDL audio driver structure */ 80 /* Define the SDL audio driver structure */
73 struct SDL_AudioDevice 81 struct SDL_AudioDevice
74 { 82 {
75 /* * * */ 83 /* * * */
78 /* The current audio specification (shared with audio thread) */ 86 /* The current audio specification (shared with audio thread) */
79 SDL_AudioSpec spec; 87 SDL_AudioSpec spec;
80 88
81 /* An audio conversion block for audio format emulation */ 89 /* An audio conversion block for audio format emulation */
82 SDL_AudioCVT convert; 90 SDL_AudioCVT convert;
91
92 /* The streamer, if sample rate conversion necessitates it */
93 int use_streamer;
94 SDL_AudioStreamer streamer;
83 95
84 /* Current state flags */ 96 /* Current state flags */
85 int iscapture; 97 int iscapture;
86 int enabled; 98 int enabled;
87 int paused; 99 int paused;