Java Code Examples for org.lwjgl.openal.AL10#alSourcePause()

The following examples show how to use org.lwjgl.openal.AL10#alSourcePause() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: AudioManager.java    From tribaltrouble with GNU General Public License v2.0 6 votes vote down vote up
public final void stopSources() {
	sound_play_counter--;
	if (sound_play_counter == 0) {
		for (int i = 0; i < sources.length; i++) {
			AudioSource source = sources[i];
			int rank = source.getRank();
			if (rank == AudioPlayer.AUDIO_RANK_MUSIC) {
				continue;
			} else if (rank == AudioPlayer.AUDIO_RANK_AMBIENT) {
				AL10.alSourcePause(sources[i].getSource());
			} else {
				AL10.alSourceStop(sources[i].getSource());
			}
		}
	}
}
 
Example 2
Source File: SoundStore.java    From opsu-dance with GNU General Public License v3.0 5 votes vote down vote up
/**
 * Pause the music loop that is currently playing
 */
public void pauseLoop() {
	if ((soundWorks) && (currentMusic != -1)){
		paused = true;
		if (stream != null)
			stream.pausing();
		AL10.alSourcePause(currentMusic);
	}
}
 
Example 3
Source File: SoundStore.java    From opsu with GNU General Public License v3.0 5 votes vote down vote up
/**
 * Pause the music loop that is currently playing
 */
public void pauseLoop() {
	if ((soundWorks) && (currentMusic != -1)){
		paused = true;
		if (stream != null)
			stream.pausing();
		AL10.alSourcePause(currentMusic);
	}
}
 
Example 4
Source File: SoundStore.java    From slick2d-maven with BSD 3-Clause "New" or "Revised" License 5 votes vote down vote up
/**
 * Pause the music loop that is currently playing
 */
public void pauseLoop() {
	if ((soundWorks) && (currentMusic != -1)){
		paused = true;
		AL10.alSourcePause(currentMusic);
	}
}
 
Example 5
Source File: Sonics.java    From AnyaBasic with MIT License 4 votes vote down vote up
public void pause()
{
    AL10.alSourcePause(source.get(0));
}
 
Example 6
Source File: LwjglAL.java    From jmonkeyengine with BSD 3-Clause "New" or "Revised" License 4 votes vote down vote up
@Override
public void alSourcePause(int source) {
    AL10.alSourcePause(source);
}
 
Example 7
Source File: LwjglAL.java    From jmonkeyengine with BSD 3-Clause "New" or "Revised" License 4 votes vote down vote up
@Override
public void alSourcePause(final int source) {
    AL10.alSourcePause(source);
}