include/SDL_audio.h
changeset 930 02759105b989
parent 911 04a403e4ccf5
child 1312 c9b51268668f
equal deleted inserted replaced
929:03fb90fc135e 930:02759105b989
    57 	   'stream' is a pointer to the audio data buffer
    57 	   'stream' is a pointer to the audio data buffer
    58 	   'len' is the length of that buffer in bytes.
    58 	   'len' is the length of that buffer in bytes.
    59 	   Once the callback returns, the buffer will no longer be valid.
    59 	   Once the callback returns, the buffer will no longer be valid.
    60 	   Stereo samples are stored in a LRLRLR ordering.
    60 	   Stereo samples are stored in a LRLRLR ordering.
    61 	*/
    61 	*/
    62 	void (*callback)(void *userdata, Uint8 *stream, int len);
    62 	void (SDLCALL *callback)(void *userdata, Uint8 *stream, int len);
    63 	void  *userdata;
    63 	void  *userdata;
    64 } SDL_AudioSpec;
    64 } SDL_AudioSpec;
    65 
    65 
    66 /* Audio format flags (defaults to LSB byte order) */
    66 /* Audio format flags (defaults to LSB byte order) */
    67 #define AUDIO_U8	0x0008	/* Unsigned 8-bit samples */
    67 #define AUDIO_U8	0x0008	/* Unsigned 8-bit samples */
    92 	Uint8 *buf;			/* Buffer to hold entire audio data */
    92 	Uint8 *buf;			/* Buffer to hold entire audio data */
    93 	int    len;			/* Length of original audio buffer */
    93 	int    len;			/* Length of original audio buffer */
    94 	int    len_cvt;			/* Length of converted audio buffer */
    94 	int    len_cvt;			/* Length of converted audio buffer */
    95 	int    len_mult;		/* buffer must be len*len_mult big */
    95 	int    len_mult;		/* buffer must be len*len_mult big */
    96 	double len_ratio; 	/* Given len, final size is len*len_ratio */
    96 	double len_ratio; 	/* Given len, final size is len*len_ratio */
    97 	void (*filters[10])(struct SDL_AudioCVT *cvt, Uint16 format);
    97 	void (SDLCALL *filters[10])(struct SDL_AudioCVT *cvt, Uint16 format);
    98 	int filter_index;		/* Current audio conversion function */
    98 	int filter_index;		/* Current audio conversion function */
    99 } SDL_AudioCVT;
    99 } SDL_AudioCVT;
   100 
   100 
   101 
   101 
   102 /* Function prototypes */
   102 /* Function prototypes */