OSDN Git Service

Fix soundfonts.
authorSaito <saito2@digitalme.com>
Fri, 5 Mar 2004 05:34:17 +0000 (05:34 +0000)
committerSaito <saito2@digitalme.com>
Fri, 5 Mar 2004 05:34:17 +0000 (05:34 +0000)
ChangeLog
timidity/sndfont.c

index 07d6762..d775958 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2004-03-05  Saito <saito@intaa.net>
+
+       * timidity/sndfont.c:
+         Fix for Soundfonts with strange loop points.
+
 2004-03-05  TAMUKI Shoichi <tamuki@linet.gr.jp>
 
        * interface/w32g_pref.c, interface/w32g_res.{h,rc}:
index e8d237a..246f029 100644 (file)
@@ -1232,8 +1232,10 @@ static void set_sample_info(SFInfo *sf, SampleList *vp, LayerTable *tbl)
 
     /* set data length */
     vp->v.data_length = vp->len + 1;
-    if(vp->v.loop_end > vp->len + 1)
+    if (vp->v.loop_end > vp->len + 1)
        vp->v.loop_end = vp->len + 1;
+       if (vp->v.loop_start > vp->len)
+       vp->v.loop_start = vp->len;
 
     /* Sample rate */
        if(sp->samplerate > 50000) {sp->samplerate = 50000;}