public void initializeMixer ( ) { // to be a bit faster, we do some precalculations calculateGlobalTuning ( ) ; // get Mod specific values frequencyTableType = mod . getFrequencyTable ( ) ; currentTempo = mod . getTempo ( ) ; currentBPM = mod . getBPMSpeed ( ) ; globalVolume = mod . getBaseVolume ( ) ; globalVolumSlideValue = 0 ; useFastSlides = mod . doFastSlides ( ) ; samplePerTicks = calculateSamplesPerTick ( ) ; currentTick = currentArrangement = currentRow = patternDelayCount = patternTicksDelayCount = 0 ; currentArrangement = 0 ; currentPatternIndex = mod . getArrangement ( ) [ currentArrangement ] ; currentPattern = mod . getPatternContainer ( ) . getPattern ( currentPatternIndex ) ; patternJumpPatternIndex = patternBreakRowIndex = patternBreakJumpPatternIndex = - 1 ; modFinished = false ; calculateVolRampLen ( ) ; // Reset all rowes played to false mod . resetLoopRecognition ( ) ; // Reset FadeOut doFadeOut = false ; fadeOutFac = 8 ; fadeOutValue = 1 << fadeOutFac ; fadeOutSub = 0x01 ; final int nChannels = mod . getNChannels ( ) ; // Now initialize every used channel for ( int c = 0 ; c < maxChannels ; c ++ ) { channelMemory [ c ] = new ChannelMemory ( ) ; if ( c < nChannels ) { final ChannelMemory aktMemo = channelMemory [ c ] ; aktMemo . panning = mod . getPanningValue ( c ) ; aktMemo . channelVolume = mod . getChannelVolume ( c ) ; initializeMixer ( c , aktMemo ) ; } } }
Call this first!