Package jm.audio

Examples of jm.audio.AOException


                tmp = new float[buffer.length];
            } else for (index = 0; index < tmp.length; index++) {
                tmp[index] = 0.0f;
            }
            if (returned != this.previous[1].nextWork(tmp)) {
                throw new AOException(this.name, 0);
            }
            for (index = 0; index < returned; index++) {
                buffer[index] = buffer[index] * tmp[index];
            }
        } else {
View Full Code Here


                SampleOut.max = Math.abs(sample);
            }
            try {
                this.dos.writeFloat(sample);
            } catch (IOException ioe) {
                throw new AOException(this.name, ioe.toString());
            }
            //if((++count%4096==0)||((i+1)==returned/*this.numOfSamples<=count)*/)){System.out.println("NUM: "+i);write(i);}
        }
        write(returned);
        return returned;
View Full Code Here

        buf[0] = new float[buffer.length];
        int returned = this.previous[0].nextWork(buf[0]);
        for (int i = 1; i < inputs; i++) {
            buf[i] = new float[returned];
            if (returned != this.previous[i].nextWork(buf[i])) {
                throw new AOException(this.name, 0);
            }
        }
        int ret = 0;
        for (; ret < returned; ret++) {
            buffer[ret] = buf[0][ret];
View Full Code Here

        buf[0] = new float[buffer.length];
        int returned = this.previous[0].nextWork(buf[0]);
        for (int i = 1; i < inputs; i++) {
            buf[i] = new float[returned];
            if (returned != this.previous[i].nextWork(buf[i])) {
                throw new AOException(this.name, 0);
            }
        }
        int ret = 0;
        for (; ret < returned; ret++) {
            for (int j = 0; j < inputs; j++) {
View Full Code Here

     * @param two AudioObjecs as input
     * @throws AOException thrown when two many inputs are attached
     */
    public Oscillator(AudioObject[] ao) throws AOException {
        super(ao, "[Oscillator]");
        if (ao.length > 2) throw new AOException(this.name, 1);
    }
View Full Code Here

        if (inputs == 2) { //Amp and Freq
            float[] ampbuf = new float[buffneed];
            int returned = this.previous[0].nextWork(ampbuf);
            float[] freqbuf = new float[returned];
            if (returned != this.previous[1].work(freqbuf)) {
                throw new AOException(this.name, 0);
            }
            for (int i = 0; ret < buffer.length; i++) {
                setSI(freqbuf[i] * frqRatio); // FM
                float sample = getWaveSample() * this.amp * ampbuf[i]; // AM
                for (int j = 0; j < channels; j++) {
View Full Code Here

    public WaveTable(AudioObject[] ao, float[] waveTable) throws AOException {

        super(ao, "[WaveTable]");

        if (ao.length > 2) throw new AOException(this.name, 1);

        this.waveTable = waveTable;

    }
View Full Code Here

            float[] freqbuf = new float[returned];

            if (returned != this.previous[1].work(freqbuf)) {

                throw new AOException(this.name, 0);

            }

            for (int i = 0; ret < buffer.length; i++) {
View Full Code Here

                tmp = new float[buffer.length];
            } else for(index = 0; index < tmp.length; index++) {
                tmp[index] = 0.0f;
            }
            if(returned != this.previous[1].nextWork(tmp)){
                throw new AOException(this.name,0);
            }
            for(index=0;index<returned;index++){
                buffer[index]=buffer[index]*tmp[index];
            }
        }else{
View Full Code Here

  public WaveTable(AudioObject[] ao, float[] waveTable)throws AOException{

    super(ao, "[WaveTable]");

    if(ao.length > 2) throw new AOException(this.name,1);

    this.waveTable = waveTable;

  }
View Full Code Here

TOP

Related Classes of jm.audio.AOException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.