Code example for SourceDataLine

Methods: startopen

            this.dataLine = (SourceDataLine)AudioSystem.getLine(info);
        private void start() throws Exception {
        private void stop() { 
        public void play(DirectAudioPlayer mediaPlayer, Pointer samples, int sampleCount, long pts) {
            // There may be more efficient ways to do this... 
            int bufferSize = sampleCount * BLOCK_SIZE;
            // You could process these samples in some way before playing them... 
            byte[] data = samples.getByteArray(0, bufferSize);
Connect your IDE to all the code out there  Get Codota for Java