本文整理匯總了Java中org.lwjgl.openal.AL10.alDeleteSources方法的典型用法代碼示例。如果您正苦於以下問題:Java AL10.alDeleteSources方法的具體用法?Java AL10.alDeleteSources怎麽用?Java AL10.alDeleteSources使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類org.lwjgl.openal.AL10
的用法示例。
在下文中一共展示了AL10.alDeleteSources方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: destroy
import org.lwjgl.openal.AL10; //導入方法依賴的package包/類
@Override
public void destroy() {
try {
if (AL.isCreated()) {
for (int i = 0; i < music.size(); i++) {
MusicController musicControllerImpl = music.get(i);
if (musicControllerImpl != null) {
musicControllerImpl.release();
}
}
for (int i = 0, n = allSources.size; i < n; i++) {
int sourceID = allSources.get(i);
int state = AL10.alGetSourcei(sourceID, AL10.AL_SOURCE_STATE);
if (state != AL10.AL_STOPPED) AL10.alSourceStop(sourceID);
AL10.alDeleteSources(sourceID);
}
sourceToSoundId.clear();
soundIdToSource.clear();
AL.destroy();
while (AL.isCreated()) {
try {
Thread.sleep(10);
} catch (InterruptedException skip) {
skip.printStackTrace();
}
}
}
} catch (UnsatisfiedLinkError e) {
e.printStackTrace();
}
}