void  scaleSampleRate(int index, float scaleFactor) {
        if (debugFlag)
            debugPrintln("JavaSoundMixer: scaleSampleRate index " +
                index + ", scale factor = " + scaleFactor);
        JSSample sample = null;
        if ((sample = (JSSample)getSample(index)) == null ||
            thread == null)
            return;
        int   dataType = sample.getDataType();
        if (debugFlag)
             debugPrintln(" scaleSampleRate.dataType = " + dataType +
                               "using sample " + sample + " from samples[" +
                                 index +"]");
        int   soundType = sample.getSoundType();

        if (dataType == JSSample.STREAMING_AUDIO_DATA ||
            dataType == JSSample.BUFFERED_AUDIO_DATA) {
            thread.setSampleRate(sample, scaleFactor);
            /**********
            // TODO:
            if (soundType != AudioDevice3D.BACKGROUND_SOUND)  {
                thread.setSampleRate( ((JSPositionalSample)sample).getSecondIndex(),
                      scaleFactor);
                thread.setSampleRate(((JSPositionalSample)sample).getReverbIndex(),
                      scaleFactor);
            }
            **********/
        }
        else if (dataType == JSSample.STREAMING_MIDI_DATA ||
                 dataType == JSSample.BUFFERED_MIDI_DATA) {
            thread.setSampleRate(sample, scaleFactor);
            /**********
            if (soundType != AudioDevice3D.BACKGROUND_SOUND)  {
                thread.setSampleRate(((JSPositionalSample)sample).getSecondIndex(),
                    scaleFactor);
                thread.setSampleRate(((JSPositionalSample)sample).getReverbIndex(),
                    scaleFactor);
            }
            **********/
        }
        else {
            if (internalErrors)
                debugPrintln(
                  "JavaSoundMixer: Internal Error scaleSampleRate dataType " +
                  dataType + " invalid");
        }
    }