music_mad.h
changeset 521 565549e046b0
parent 518 8bc9b5fd2aae
child 542 3de4970b36d4
equal deleted inserted replaced
520:61a1516bc06a 521:565549e046b0
    40   MS_cvt_decoded  = 0x0200,
    40   MS_cvt_decoded  = 0x0200,
    41 };
    41 };
    42 
    42 
    43 typedef struct {
    43 typedef struct {
    44   SDL_RWops *rw;
    44   SDL_RWops *rw;
    45   SDL_bool freerw;
    45   int freerw;
    46   struct mad_stream stream;
    46   struct mad_stream stream;
    47   struct mad_frame frame;
    47   struct mad_frame frame;
    48   struct mad_synth synth;
    48   struct mad_synth synth;
    49   int frames_read;
    49   int frames_read;
    50   mad_timer_t next_frame_start;
    50   mad_timer_t next_frame_start;
    57   unsigned char input_buffer[MAD_INPUT_BUFFER_SIZE + MAD_BUFFER_GUARD];
    57   unsigned char input_buffer[MAD_INPUT_BUFFER_SIZE + MAD_BUFFER_GUARD];
    58   unsigned char output_buffer[MAD_OUTPUT_BUFFER_SIZE];
    58   unsigned char output_buffer[MAD_OUTPUT_BUFFER_SIZE];
    59 } mad_data;
    59 } mad_data;
    60 
    60 
    61 mad_data *mad_openFile(const char *filename, SDL_AudioSpec *mixer);
    61 mad_data *mad_openFile(const char *filename, SDL_AudioSpec *mixer);
    62 mad_data *mad_openFileRW(SDL_RWops *rw, SDL_AudioSpec *mixer);
    62 mad_data *mad_openFileRW(SDL_RWops *rw, SDL_AudioSpec *mixer, int freerw);
    63 void mad_closeFile(mad_data *mp3_mad);
    63 void mad_closeFile(mad_data *mp3_mad);
    64 
    64 
    65 void mad_start(mad_data *mp3_mad);
    65 void mad_start(mad_data *mp3_mad);
    66 void mad_stop(mad_data *mp3_mad);
    66 void mad_stop(mad_data *mp3_mad);
    67 int mad_isPlaying(mad_data *mp3_mad);
    67 int mad_isPlaying(mad_data *mp3_mad);