|
|
@ -126,7 +126,6 @@ public class AndroidOpenALSoftAudioRenderer implements AndroidAudioRenderer, Run |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
logger.log(Level.INFO, "Exiting audioThread run loop"); |
|
|
|
|
|
|
|
synchronized (threadLock) { |
|
|
|
synchronized (threadLock) { |
|
|
|
cleanupInThread(); |
|
|
|
cleanupInThread(); |
|
|
|
} |
|
|
|
} |
|
|
@ -136,7 +135,6 @@ public class AndroidOpenALSoftAudioRenderer implements AndroidAudioRenderer, Run |
|
|
|
try { |
|
|
|
try { |
|
|
|
if (!alIsCreated()) { |
|
|
|
if (!alIsCreated()) { |
|
|
|
//AL.create();
|
|
|
|
//AL.create();
|
|
|
|
logger.log(Level.INFO, "Creating OpenAL Soft Renderer"); |
|
|
|
|
|
|
|
alCreate(); |
|
|
|
alCreate(); |
|
|
|
checkError(false); |
|
|
|
checkError(false); |
|
|
|
} |
|
|
|
} |
|
|
@ -190,8 +188,6 @@ public class AndroidOpenALSoftAudioRenderer implements AndroidAudioRenderer, Run |
|
|
|
|
|
|
|
|
|
|
|
//supportEfx = alcIsExtensionPresent(device, "ALC_EXT_EFX");
|
|
|
|
//supportEfx = alcIsExtensionPresent(device, "ALC_EXT_EFX");
|
|
|
|
supportEfx = alcIsExtensionPresent(AL.ALC_EXT_EFX_NAME); |
|
|
|
supportEfx = alcIsExtensionPresent(AL.ALC_EXT_EFX_NAME); |
|
|
|
logger.log(Level.INFO, "{0} found: {1}", |
|
|
|
|
|
|
|
new Object[]{AL.ALC_EXT_EFX_NAME, supportEfx}); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (supportEfx) { |
|
|
|
if (supportEfx) { |
|
|
|
ib.position(0).limit(1); |
|
|
|
ib.position(0).limit(1); |
|
|
@ -232,10 +228,8 @@ public class AndroidOpenALSoftAudioRenderer implements AndroidAudioRenderer, Run |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public void cleanupInThread() { |
|
|
|
public void cleanupInThread() { |
|
|
|
logger.log(Level.INFO, "cleanupInThread"); |
|
|
|
|
|
|
|
if (audioDisabled) { |
|
|
|
if (audioDisabled) { |
|
|
|
//AL.destroy();
|
|
|
|
//AL.destroy();
|
|
|
|
logger.log(Level.INFO, "Destroying OpenAL Soft Renderer with audioDisabled"); |
|
|
|
|
|
|
|
alDestroy(); |
|
|
|
alDestroy(); |
|
|
|
checkError(true); |
|
|
|
checkError(true); |
|
|
|
return; |
|
|
|
return; |
|
|
@ -279,10 +273,8 @@ public class AndroidOpenALSoftAudioRenderer implements AndroidAudioRenderer, Run |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public void cleanup() { |
|
|
|
public void cleanup() { |
|
|
|
logger.log(Level.INFO, "cleanup"); |
|
|
|
|
|
|
|
// kill audio thread
|
|
|
|
// kill audio thread
|
|
|
|
if (audioThread.isAlive()) { |
|
|
|
if (audioThread.isAlive()) { |
|
|
|
logger.log(Level.INFO, "Interrupting audioThread"); |
|
|
|
|
|
|
|
audioThread.interrupt(); |
|
|
|
audioThread.interrupt(); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|