(int num)
| 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; |
no test coverage detected