예제 #1
0
    /*******************************************************************
     *Função membro getCopy
     *Parâmetros: void
     *Retorna Cópia do efeito, no estado actual em que se encontra
     *******************************************************************/
    AelEffect* AelButterWorth::getCopy(){
        AelButterWorth *cp = new AelButterWorth(gain, cutoff, BandWidth ,getNChannels(), getSampleRate());
        
        cp->ON = ON;

        switch (ON) {
            case lowpass:
                cp->set_LPF();
                break;
            case highpass:
                cp->set_HPF();
                break;
            case rejectband:
                cp->set_NOTCH();
                break;
            case bandpass:
                cp->set_BPF();
                break;
            default:
                break;
        }
        
        cp->setWetLevel(getWetLevel());
        
        if(!isOn()){
            cp->m_turnOff();
        }
        
        
        return cp;
        
    }
예제 #2
0
 /*******************************************************************
  *Função membro getCopy
  *Parâmetros: void
  *Retorna Cópia do efeito, no estado actual em que se encontra
  *******************************************************************/
 AelEffect* AelIIR::getCopy(){
     AelIIR *cp = new AelIIR(gain, cutoff, getNChannels(), getSampleRate());
 
     cp->ON = ON;
     
     if(ON == lowpass){
         cp->set_LPF();
     }
     else cp->set_HPF();
     
     cp->setWetLevel(getWetLevel());
     
     if(!isOn()){
         cp->m_turnOff();
     }
 
     return cp;
 }
예제 #3
0
  audiodata madaudiofile::getNextAudioSlice(int duration, bool enablefft) {
    if (outputLength==0)
      getNextAudioFrame();

    audiodata aud((double)duration, samplerate, getNChannels(), 16, enablefft);
    int currentDuration = 0;

    /*      while(currentDuration < duration && outputLength != 0) {
    // Adds data until end_pos or until end of the frame has been reached.
    // Returns the last added pos+1*/
    currentDuration = aud.pushData(OutputBuffer, &outputPosition, 
				   outputLength, duration); 

    if (currentDuration < duration && outputPosition >= outputLength)
      getNextAudioFrame();

    //}
    current_pos += currentDuration;

    return aud;
  }