Java 8 DataLine.Info - top ranked examples from Open Source projects

These code examples were ranked by Codota’s semantic indexing as the best open source examples for Java 8 DataLine.Info class.

This code example shows how to use the following methods:
        private final SourceDataLine dataLine;
 
        public JavaSoundDirectAudioPlayerComponent(String format, int rate, int channels) throws Exception {
            super(format, rate, channels);
            this.audioFormat = new AudioFormat(rate, SAMPLE_BITS, channels, true, false);
            this.info = new Info(SourceDataLine.class, audioFormat);
            this.dataLine = (SourceDataLine)AudioSystem.getLine(info);
        } 
 
        private void start() throws Exception {
            Logger.info("start()"); 
            dataLine.open(audioFormat);
            dataLine.start();
        } 
 
        private void stop() { 
            Logger.info("stop()"); 
            dataLine.close();
        } 
 
3
CodeRank
Contextual code suggestions in your IDE  Get Codota for Java
See Code Examples for Java 8 DataLine.Info Methods: