當前位置: 首頁>>代碼示例>>Java>>正文


Java AL10.AL_PAUSED屬性代碼示例

本文整理匯總了Java中org.lwjgl.openal.AL10.AL_PAUSED屬性的典型用法代碼示例。如果您正苦於以下問題:Java AL10.AL_PAUSED屬性的具體用法?Java AL10.AL_PAUSED怎麽用?Java AL10.AL_PAUSED使用的例子?那麽, 這裏精選的屬性代碼示例或許可以為您提供幫助。您也可以進一步了解該屬性所在org.lwjgl.openal.AL10的用法示例。


在下文中一共展示了AL10.AL_PAUSED屬性的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: findFreeSource

/**
 * Find a free sound source
 * 
 * @return The index of the free sound source
 */
private int findFreeSource() {
	for (int i=1;i<sourceCount-1;i++) {
		int state = AL10.alGetSourcei(sources.get(i), AL10.AL_SOURCE_STATE);
		
		if ((state != AL10.AL_PLAYING) && (state != AL10.AL_PAUSED)) {
			return i;
		}
	}
	
	return -1;
}
 
開發者ID:j-dong,項目名稱:trashjam2017,代碼行數:16,代碼來源:SoundStore.java

示例2: isMusicPlaying

/**
 * Check if the music is currently playing
 * 
 * @return True if the music is playing
 */
public boolean isMusicPlaying() 
{
	if (!soundWorks) {
		return false;
	}
	
	int state = AL10.alGetSourcei(sources.get(0), AL10.AL_SOURCE_STATE);
	return ((state == AL10.AL_PLAYING) || (state == AL10.AL_PAUSED));
}
 
開發者ID:j-dong,項目名稱:trashjam2017,代碼行數:14,代碼來源:SoundStore.java

示例3: resumeSourcesWithBuffer

public void resumeSourcesWithBuffer(int bufferID) {
    if (AL.isCreated()) {
        for (int i = 0, n = idleSources.size; i < n; i++) {
            int sourceID = idleSources.get(i);
            if (AL10.alGetSourcei(sourceID, AL10.AL_BUFFER) == bufferID) {
                if (AL10.alGetSourcei(sourceID, AL10.AL_SOURCE_STATE) == AL10.AL_PAUSED) {
                    AL10.alSourcePlay(sourceID);
                }
            }
        }
    }
}
 
開發者ID:dmitrykolesnikovich,項目名稱:featurea,代碼行數:12,代碼來源:OpenALImpl.java

示例4: resumeSound

public void resumeSound(long soundId) {
    if (AL.isCreated()) {
        if (soundIdToSource.containsKey(soundId)) {
            int sourceId = soundIdToSource.get(soundId);
            if (AL10.alGetSourcei(sourceId, AL10.AL_SOURCE_STATE) == AL10.AL_PAUSED) {
                AL10.alSourcePlay(sourceId);
            }
        }
    }
}
 
開發者ID:dmitrykolesnikovich,項目名稱:featurea,代碼行數:10,代碼來源:OpenALImpl.java

示例5: update

public void update(){
	int state = AL10.alGetSourcei(id, AL10.AL_SOURCE_STATE);
	if(state != AL10.AL_PLAYING && state != AL10.AL_PAUSED)
		stop();
}
 
開發者ID:tek256,項目名稱:LD38,代碼行數:5,代碼來源:Source.java


注:本文中的org.lwjgl.openal.AL10.AL_PAUSED屬性示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。