Path: blob/master/SLICK_HOME/src/org/newdawn/slick/openal/Audio.java
1461 views
package org.newdawn.slick.openal;12/**3* The description of of audio data loaded by the AudioLoader4*5* @author kevin6* @author Nathan Sweet <[email protected]>7*/8public interface Audio {910/**11* Stop the sound effect12*/13public void stop();1415/**16* Get the ID of the OpenAL buffer holding this data (if any). This method17* is not valid with streaming resources.18*19* @return The ID of the OpenAL buffer holding this data20*/21public int getBufferID();2223/**24* Check if the sound is playing as sound fx25*26* @return True if the sound is playing27*/28public boolean isPlaying();2930/**31* Play this sound as a sound effect32*33* @param pitch The pitch of the play back34* @param gain The gain of the play back35* @param loop True if we should loop36* @return The ID of the source playing the sound37*/38public int playAsSoundEffect(float pitch, float gain, boolean loop);3940/**41* Play this sound as a sound effect42*43* @param pitch The pitch of the play back44* @param gain The gain of the play back45* @param loop True if we should loop46* @param x The x position of the sound47* @param y The y position of the sound48* @param z The z position of the sound49* @return The ID of the source playing the sound50*/51public int playAsSoundEffect(float pitch, float gain, boolean loop,52float x, float y, float z);5354/**55* Play this sound as music56*57* @param pitch The pitch of the play back58* @param gain The gain of the play back59* @param loop True if we should loop60* @return The ID of the source playing the sound61*/62public int playAsMusic(float pitch, float gain, boolean loop);6364/**65* Seeks to a position in the music.66*67* @param position Position in seconds.68* @return True if the setting of the position was successful69*/70public boolean setPosition(float position);7172/**73* Return the current playing position in the sound74*75* @return The current position in seconds.76*/77public float getPosition();78}798081