Generalise Audio API but use SYSTEM_AUDIO

pull/35/head
James Ball 2021-05-27 16:11:43 +01:00
rodzic 168024de5b
commit 95df1ee720
2 zmienionych plików z 2 dodań i 3 usunięć

Wyświetl plik

@ -6,7 +6,7 @@
<groupId>sh.ball</groupId>
<artifactId>osci-render</artifactId>
<version>1.6.2</version>
<version>1.6.3</version>
<name>osci-render</name>

Wyświetl plik

@ -35,7 +35,6 @@ public class AudioPlayer implements Renderer<List<Shape>, AudioInputStream> {
private static final int BITS_PER_SAMPLE = 16;
private static final boolean SIGNED = true;
private static final boolean BIG_ENDIAN = false;
private static final boolean WINDOWS = System.getProperty("os.name").startsWith("Windows");
private final XtFormat format;
private final BlockingQueue<List<Shape>> frameQueue = new ArrayBlockingQueue<>(BUFFER_SIZE);
@ -163,7 +162,7 @@ public class AudioPlayer implements Renderer<List<Shape>, AudioInputStream> {
}
try (XtPlatform platform = XtAudio.init(null, null)) {
XtSystem system = WINDOWS ? XtSystem.WASAPI : platform.setupToSystem(XtSetup.CONSUMER_AUDIO);
XtSystem system = platform.setupToSystem(XtSetup.SYSTEM_AUDIO);
XtService service = platform.getService(system);
if (service == null) return;