Mercurial > jmeCapture
comparison src/com/aurellem/capture/audio/AudioSendRenderer.java @ 43:2f129118e2d6
removed old files and moved natives unpacking to the AudioRenderer
author | Robert McIntyre <rlm@mit.edu> |
---|---|
date | Wed, 30 Nov 2011 06:32:36 -0700 |
parents | 784a3f4e6202 |
children | 23e3df41db3c |
comparison
equal
deleted
inserted
replaced
42:b1bc965a38d2 | 43:2f129118e2d6 |
---|---|
1 package com.aurellem.capture.audio; | 1 package com.aurellem.capture.audio; |
2 | 2 |
3 import java.io.IOException; | |
3 import java.lang.reflect.Field; | 4 import java.lang.reflect.Field; |
4 import java.nio.ByteBuffer; | 5 import java.nio.ByteBuffer; |
5 import java.util.HashMap; | 6 import java.util.HashMap; |
6 import java.util.Vector; | 7 import java.util.Vector; |
7 import java.util.concurrent.CountDownLatch; | 8 import java.util.concurrent.CountDownLatch; |
18 | 19 |
19 import com.aurellem.send.AudioSend; | 20 import com.aurellem.send.AudioSend; |
20 import com.jme3.audio.Listener; | 21 import com.jme3.audio.Listener; |
21 import com.jme3.audio.lwjgl.LwjglAudioRenderer; | 22 import com.jme3.audio.lwjgl.LwjglAudioRenderer; |
22 import com.jme3.math.Vector3f; | 23 import com.jme3.math.Vector3f; |
24 import com.jme3.system.JmeSystem; | |
25 import com.jme3.system.Natives; | |
23 import com.jme3.util.BufferUtils; | 26 import com.jme3.util.BufferUtils; |
24 | 27 |
25 public class AudioSendRenderer | 28 public class AudioSendRenderer |
26 | 29 |
27 extends LwjglAudioRenderer implements MultiListener { | 30 extends LwjglAudioRenderer implements MultiListener { |
102 * creates the "Multiple Audio Send" device, which supports multiple listeners in a limited | 105 * creates the "Multiple Audio Send" device, which supports multiple listeners in a limited |
103 * capacity. For each listener, the device renders it not to the sound device, but | 106 * capacity. For each listener, the device renders it not to the sound device, but |
104 * instead to buffers which it makes available via JNI. | 107 * instead to buffers which it makes available via JNI. |
105 */ | 108 */ |
106 public void initInThread(){ | 109 public void initInThread(){ |
110 | |
111 try{ | |
112 switch (JmeSystem.getPlatform()){ | |
113 case Windows64: | |
114 Natives.extractNativeLib("windows/audioSend", "OpenAL64", true, true); | |
115 break; | |
116 case Windows32: | |
117 Natives.extractNativeLib("windows/audioSend", "OpenAL32", true, true); | |
118 break; | |
119 case Linux64: | |
120 Natives.extractNativeLib("linux/audioSend", "openal64", true, true); | |
121 break; | |
122 case Linux32: | |
123 Natives.extractNativeLib("linux/audioSend", "openal", true, true); | |
124 break; | |
125 } | |
126 } | |
127 catch (IOException ex) {ex.printStackTrace();} | |
128 | |
107 try{ | 129 try{ |
108 if (!AL.isCreated()){ | 130 if (!AL.isCreated()){ |
109 AL.create("Multiple Audio Send", 44100, 60, false); | 131 AL.create("Multiple Audio Send", 44100, 60, false); |
110 } | 132 } |
111 }catch (OpenALException ex){ | 133 }catch (OpenALException ex){ |