comparison decoders/midi.c @ 477:3e705c9180e5

Fixed binary compatibility, added Sound_GetDuration().
author Ryan C. Gordon <icculus@icculus.org>
date Wed, 12 May 2004 02:15:00 +0000
parents c66080364dff
children 8a814bbbedfa
comparison
equal deleted inserted replaced
475:f0b8865577db 477:3e705c9180e5
105 Timidity_Start(song); 105 Timidity_Start(song);
106 106
107 SNDDBG(("MIDI: Accepting data stream.\n")); 107 SNDDBG(("MIDI: Accepting data stream.\n"));
108 108
109 internal->decoder_private = (void *) song; 109 internal->decoder_private = (void *) song;
110 internal->total_time = Timidity_GetSongLength(song);
110 111
111 sample->actual.channels = 2; 112 sample->actual.channels = 2;
112 sample->actual.rate = 44100; 113 sample->actual.rate = 44100;
113 sample->actual.format = AUDIO_S16SYS; 114 sample->actual.format = AUDIO_S16SYS;
115 sample->flags = SOUND_SAMPLEFLAG_CANSEEK;
114 116
115 sample->total_time = Timidity_GetSongLength(song);
116 sample->flags = SOUND_SAMPLEFLAG_CANSEEK;
117 return(1); /* we'll handle this data. */ 117 return(1); /* we'll handle this data. */
118 } /* MIDI_open */ 118 } /* MIDI_open */
119 119
120 120
121 static void MIDI_close(Sound_Sample *sample) 121 static void MIDI_close(Sound_Sample *sample)