Ticket #9188: 0001-rjp1-calculate-sample-length-correctly.patch

File 0001-rjp1-calculate-sample-length-correctly.patch, 781 bytes (added by fuzzie, 14 years ago)
  • sound/mods/rjp1.cpp

    From 74031681b184e0eebd11ec0e0748868969ff10e7 Mon Sep 17 00:00:00 2001
    From: Alyssa Milburn <fuzzie@fuzzie.org>
    Date: Sat, 22 May 2010 21:53:17 +0200
    Subject: [PATCH] rjp1: calculate sample length correctly
    
    ---
     sound/mods/rjp1.cpp |    2 +-
     1 files changed, 1 insertions(+), 1 deletions(-)
    
    diff --git a/sound/mods/rjp1.cpp b/sound/mods/rjp1.cpp
    index fc1b49e..be376d6 100644
    a b void Rjp1::setupNote(Rjp1Channel *channel, int16 period) {  
    422422                channel->envelopeMode = 4;
    423423                channel->data = channel->waveData;
    424424                channel->pos = READ_BE_UINT16(note + 16);
    425                 channel->len = READ_BE_UINT16(note + 18);
     425                channel->len = channel->pos + READ_BE_UINT16(note + 18);
    426426                channel->setupNewNote = true;
    427427        }
    428428}