diff decoders/mikmod.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
line wrap: on
line diff
--- a/decoders/mikmod.c	Sat May 08 22:06:14 2004 +0000
+++ b/decoders/mikmod.c	Wed May 12 02:15:00 2004 +0000
@@ -282,9 +282,9 @@
 
     /*
      *   module->sngtime = current song time in 2^-10 seconds
-     *   sample->total_time = (module->sngtime * 1000) / (1<<10)
+     *   internal->total_time = (module->sngtime * 1000) / (1<<10)
      */
-    sample->total_time = (module->sngtime * 1000) / (1<<10);
+    internal->total_time = (module->sngtime * 1000) / (1<<10);
 
     SNDDBG(("MIKMOD: Name: %s\n", module->songname));
     SNDDBG(("MIKMOD: Type: %s\n", module->modtype));
@@ -322,7 +322,7 @@
      * For each position (which corresponds to a particular pattern),
      * get the speed values and compute the time length of the segment
      */
-    sample->total_time = 0;
+    internal->total_time = 0;
     for (i = 0; i < module->numpos; i++)
     {
         Player_SetPosition(i);
@@ -378,7 +378,7 @@
                           125.0 / module->bpm);
     } /* for */
     /* Now convert to milliseconds and store the value */
-    sample->total_time = (Sint32)(segment_time * 1000); 
+    internal->total_time = (Sint32)(segment_time * 1000);
 
     /* Reset the sample to the beginning */
     Player_SetPosition(0);
@@ -462,7 +462,7 @@
         return(1);
     } /* if */
 
-    if (ms >= sample->total_time)
+    if (ms >= internal->total_time)
         Player_SetPosition(module->numpos);
 
     /* Convert time to seconds (double) to make comparisons easier */