MCPcopy Create free account
hub / github.com/OpenEndedGroup/Field2 / init

Method init

src/main/java/trace/sound/Sound.java:60–83  ·  view source on GitHub ↗
(int num)

Source from the content-addressed store, hash-verified

58
59 sources.add(s);
60 free.add(s);
61 return s;
62 }
63
64 public Sound init(int num) {
65
66 long device = alcOpenDevice((ByteBuffer) null);
67
68 ALCCapabilities deviceCaps = ALC.createCapabilities(device);
69
70 context = alcCreateContext(device, (IntBuffer) null);
71 alcMakeContextCurrent(context);
72 AL.createCapabilities(deviceCaps);
73
74 System.out.println("devices :" + ALC10.alcGetString(0, ALC10.ALC_EXTENSIONS));
75 System.out.println("devices :" + ALC10.alcGetString(context, ALC10.ALC_DEVICE_SPECIFIER));
76 System.out.println("devices :" + AL10.alGetString(AL10.AL_VENDOR));
77 System.out.println("devices :" + AL10.alGetString(AL10.AL_RENDERER));
78 System.out.println("devices :" + AL10.alGetString(AL10.AL_VERSION));
79 System.out.println("devices :" + ALC10.alcGetInteger(context, ALC10.ALC_MAJOR_VERSION));
80 System.out.println("devices :" + ALC10.alcGetInteger(context, ALC10.ALC_MINOR_VERSION));
81 for (int i = 0; i < num; i++)
82 makeSource();
83 System.out.println(" init openal :" + AL10.alGetError() + " "
84 + sources.size() + " sources");
85
86 return this;

Callers 2

SimpleOculusTargetClass · 0.45
startMethod · 0.45

Calls 3

makeSourceMethod · 0.95
printlnMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected