kopia lustrzana https://github.com/jameshball/osci-render
Generalise Audio API but use SYSTEM_AUDIO
rodzic
168024de5b
commit
95df1ee720
2
pom.xml
2
pom.xml
|
@ -6,7 +6,7 @@
|
||||||
|
|
||||||
<groupId>sh.ball</groupId>
|
<groupId>sh.ball</groupId>
|
||||||
<artifactId>osci-render</artifactId>
|
<artifactId>osci-render</artifactId>
|
||||||
<version>1.6.2</version>
|
<version>1.6.3</version>
|
||||||
|
|
||||||
<name>osci-render</name>
|
<name>osci-render</name>
|
||||||
|
|
||||||
|
|
|
@ -35,7 +35,6 @@ public class AudioPlayer implements Renderer<List<Shape>, AudioInputStream> {
|
||||||
private static final int BITS_PER_SAMPLE = 16;
|
private static final int BITS_PER_SAMPLE = 16;
|
||||||
private static final boolean SIGNED = true;
|
private static final boolean SIGNED = true;
|
||||||
private static final boolean BIG_ENDIAN = false;
|
private static final boolean BIG_ENDIAN = false;
|
||||||
private static final boolean WINDOWS = System.getProperty("os.name").startsWith("Windows");
|
|
||||||
|
|
||||||
private final XtFormat format;
|
private final XtFormat format;
|
||||||
private final BlockingQueue<List<Shape>> frameQueue = new ArrayBlockingQueue<>(BUFFER_SIZE);
|
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)) {
|
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);
|
XtService service = platform.getService(system);
|
||||||
if (service == null) return;
|
if (service == null) return;
|
||||||
|
|
||||||
|
|
Ładowanie…
Reference in New Issue