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

Method makeSource

src/main/java/trace/sound/Sound.java:40–58  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

38 new int[]{0,});
39 }
40
41 List<Source> sources = new ArrayList<>();
42 List<Source> free = new ArrayList<>();
43
44 public Source makeSource() {
45 Source s = new Source();
46 AL10.alGenSources(s.source);
47 if (AL10.alGetError() != AL10.AL_NO_ERROR)
48 return null;
49
50 AL10.alSourcef(s.source.get(0), AL10.AL_PITCH, 1.0f);
51 AL10.alSourcef(s.source.get(0), AL10.AL_GAIN, 1.0f);
52 s.sourcePos.rewind();
53 s.sourceVel.rewind();
54 AL10.alSource3f(s.source.get(0), AL10.AL_POSITION, 0, 0, 0);
55 AL10.alSource3f(s.source.get(0), AL10.AL_VELOCITY, 0, 0, 0);
56 s.sourcePos.rewind();
57 s.sourceVel.rewind();
58
59 sources.add(s);
60 free.add(s);
61 return s;

Callers 1

initMethod · 0.95

Calls 2

getMethod · 0.65
addMethod · 0.45

Tested by

no test coverage detected