kopia lustrzana https://github.com/jameshball/osci-render
Throw helpful error if no default device is found
rodzic
e711db34d9
commit
84dc5ee6d0
2
pom.xml
2
pom.xml
|
@ -6,7 +6,7 @@
|
|||
|
||||
<groupId>sh.ball</groupId>
|
||||
<artifactId>osci-render</artifactId>
|
||||
<version>1.7.1</version>
|
||||
<version>1.7.2</version>
|
||||
|
||||
<name>osci-render</name>
|
||||
|
||||
|
|
|
@ -133,6 +133,9 @@ public class Controller implements Initializable, FrequencyListener, Listener {
|
|||
frames.addListener(this);
|
||||
this.producer = new FrameProducer<>(audioPlayer, frames);
|
||||
this.defaultDevice = audioPlayer.getDefaultDevice();
|
||||
if (defaultDevice == null) {
|
||||
throw new RuntimeException("No default audio device found!");
|
||||
}
|
||||
this.sampleRate = defaultDevice.sampleRate();
|
||||
this.rotateEffect = new RotateEffect(sampleRate);
|
||||
this.translateEffect = new TranslateEffect(sampleRate);
|
||||
|
|
Ładowanie…
Reference in New Issue