From 00df76c4fb448d7d14ed8386591c4a0337af21f2 Mon Sep 17 00:00:00 2001 From: Niels Martin Hansen Date: Thu, 14 May 2009 21:26:39 +0000 Subject: [PATCH] Remove some unused code from karaoke UI. Originally committed to SVN as r2926. --- aegisub/src/audio_karaoke.cpp | 52 ----------------------------------- aegisub/src/audio_karaoke.h | 1 - 2 files changed, 53 deletions(-) diff --git a/aegisub/src/audio_karaoke.cpp b/aegisub/src/audio_karaoke.cpp index 94bf35863..b62ce8f4a 100644 --- a/aegisub/src/audio_karaoke.cpp +++ b/aegisub/src/audio_karaoke.cpp @@ -754,58 +754,6 @@ int AudioKaraoke::SplitSyl (unsigned int n) { } -////////////////////////////////// -// Apply delta length to syllable -// FIXME: is this even used? -bool AudioKaraoke::SyllableDelta(int n,int delta,int mode) { - wxLogDebug(_T("AudioKaraoke::SyllableDelta(n=%d, delta=%d, mode=%d)"), n, delta, mode); - // Get syllable and next - AudioKaraokeSyllable *curSyl=NULL,*nextSyl=NULL; - curSyl = &syllables.at(n); - int nkar = syllables.size(); - if (n < nkar-1) { - nextSyl = &syllables.at(n+1); - } - - // Get variables - int len = curSyl->duration; - - // Cap delta - int minLen = 0; - if (len + delta < minLen) delta = minLen-len; - if (mode == 0 && nextSyl && (nextSyl->duration - delta) < minLen) delta = nextSyl->duration - minLen; - - wxLogDebug(_T("AudioKaraoke::SyllableDelta: nkar=%d, len=%d, minLen=%d, delta=%d"), nkar, len, minLen, delta); - - // Apply - if (delta != 0) { - wxLogDebug(_T("AudioKaraoke::SyllableDelta: delta != 0")); - curSyl->duration += delta; - - // Normal mode - if (mode == 0 && nextSyl) { - wxLogDebug(_T("AudioKaraoke::SyllableDelta: normal mode")); - nextSyl->duration -= delta; - nextSyl->start_time += delta; - } - - // Shift mode - if (mode == 1) { - wxLogDebug(_T("AudioKaraoke::SyllableDelta: shift mode")); - for (int i=n+1;i