Code example for SourceDataLine

Methods: getBufferSizegetFormat

0
            AudioMetaData mdata)
    { 
        system = sys;
        samples = samps;
        meta = mdata;
        format = sdl.getFormat();
        finished = false;
        line = sdl;
        loop = false;
        play = false;
        numLoops = 0;
        loopBegin = 0;
        loopEnd = (int)AudioUtils.millis2BytesFrameAligned( meta.length(),
                format );
        rawBytes = new byte[sdl.getBufferSize() / 8];
        iothread = null;
        totalBytesRead = 0;
        bytesWritten = 0;
        shouldRead = true;
    } 
Experience pair programming with AI  Get Codota for Java