33package com.jogamp.audio.windows.waveout;
36import com.jogamp.nativewindow.NativeSurface;
37import com.jogamp.opengl.GLDrawableFactory;
40 public static void main(String[] args) {
41 if (args.length != 1) {
42 System.out.println(
"Usage: TestSpatialization [file name]");
50 }
catch (Exception e) {}
57 long startTime = System.currentTimeMillis();
58 long duration = 10000;
62 }
catch (InterruptedException e) {
64 System.out.println(
"Playing...");
67 while ((curTime = System.currentTimeMillis()) < startTime + duration) {
69 float rads = (float) (((2 * Math.PI) * (((
float) (curTime - startTime)) / 1000.0f)) / 2);
70 track.
setPosition((
float) Math.cos(rads), 0, (float) Math.sin(rads));
77 }
catch (InterruptedException e) {
80 System.out.println(
"Shutting down audio subsystem");
82 System.out.println(
"Exiting.");
84 }
catch (Exception e) {
Track newTrack(final File file)
static synchronized Audio getInstance()
static void main(String[] args)
synchronized void setLooping(final boolean looping)
void setPosition(final float x, final float y, final float z)
static GLDrawableFactory getFactory(final GLProfile glProfile)
Returns the sole GLDrawableFactory instance.
Provides low-level information required for hardware-accelerated rendering using a surface in a platf...