comparison decoders/smpeg.c @ 436:45614e2c1c81

Patch to fix rewinding code by Eric Wing.
author Ryan C. Gordon <icculus@icculus.org>
date Sun, 12 Jan 2003 20:59:25 +0000
parents c42ac9ee2ce4
children c66080364dff 0f5888f9aef7
comparison
equal deleted inserted replaced
435:63a75d588043 436:45614e2c1c81
264 * SMPEG_rewind() really means "stop and rewind", so we may have to 264 * SMPEG_rewind() really means "stop and rewind", so we may have to
265 * restart it afterwards. 265 * restart it afterwards.
266 */ 266 */
267 status = SMPEG_status(smpeg); 267 status = SMPEG_status(smpeg);
268 SMPEG_rewind(smpeg); 268 SMPEG_rewind(smpeg);
269 /* EW: I think SMPEG_play() has an independent and unrelated meaning
270 * to the flag, "SMPEG_PLAYING". This is why the SMPEG_play() call
271 * is done in the open() function even though the file is not yet
272 * technically playing. I believe SMPEG_play() must always be active
273 * because this seems to be what's causing the:
274 * "Can't rewind after the file has finished playing once" problem,
275 * because always recalling it here seems to make the problem go away.
276 */
277 /*
269 if (status == SMPEG_PLAYING) 278 if (status == SMPEG_PLAYING)
270 SMPEG_play(smpeg); 279 SMPEG_play(smpeg);
280 */
281 SMPEG_play(smpeg);
271 return(1); 282 return(1);
272 } /* _SMPEG_rewind */ 283 } /* _SMPEG_rewind */
273 284
274 285
275 static int _SMPEG_seek(Sound_Sample *sample, Uint32 ms) 286 static int _SMPEG_seek(Sound_Sample *sample, Uint32 ms)