IrrKlang.NET |

# ISound Properties

The properties of the ISound class are listed below. For a complete list of ISound class members, see the ISound Members topic.

#### Public Instance Properties

Finished | returns if the sound has finished playing. Don't mix this up with isPaused(). isFinished() returns if the sound has been finished playing. If it has, is maybe already have been removed from the playing list of the sound engine and calls to any other of the methods of ISound will not have any result. If you call stop() to a playing sound will result that this function will return true when invoked.
Looped | gets or sets if the sound has been started to play looped. If the sound is playing looped and it is changed to not-looped, then it will stop playing after the loop has finished. If it is not looped and changed to looped, the sound will start repeating to be played when it reaches its end. Invoking this method will not have an effect when the sound already has stopped.
MaxDistance | Sets the maximal distance if this is a 3D sound. Specify the distances at which 3D sounds stop getting louder or quieter. This works like this: As a listener approaches a 3D sound source, the sound gets louder. Past a certain point, it is not reasonable for the volume to continue to increase. Either the maximum (zero) has been reached, or the nature of the sound source imposes a logical limit. This is the minimum distance for the sound source. Similarly, the maximum distance for a sound source is the distance beyond which the sound does not get any quieter. The default minimum distance is 1, the default max distance is a huge number nearly to infinite.
MinDistance | Sets the minimal distance if this is a 3D sound. Specify the distances at which 3D sounds stop getting louder or quieter. This works like this: As a listener approaches a 3D sound source, the sound gets louder. Past a certain point, it is not reasonable for the volume to continue to increase. Either the maximum (zero) has been reached, or the nature of the sound source imposes a logical limit. This is the minimum distance for the sound source. Similarly, the maximum distance for a sound source is the distance beyond which the sound does not get any quieter. The default minimum distance is 1, the default max distance is a huge number nearly to infinite.
Pan | sets the pan of the sound. Takes a value between -1 and 1, 0 is center.
Paused | returns if the sound is paused
PlaybackSpeed | Sets or gets the playback speed (frequency) of the sound. Plays the sound at a higher or lower speed, increasing or decreasing its frequency which makes it sound lower or higher. Note that this feature is not available on all sound output drivers (it is on the DirectSound drivers at least), and it does not work together with the 'enableSoundEffects' parameter of ISoundEngine::play2D and ISoundEngine::play3D when using DirectSound.
PlayLength | Returns the play length of the sound in milliseconds. Returns -1 if not known for this sound for example because its decoder does not support length reporting or it is a file stream of unknown size. Note: You can also use ISoundSource::getPlayLength() to get the length of a sound without actually needing to play it.
PlayPosition | returns or sets the current play position of the sound in milliseconds. Returns -1 if not implemented or possible for this sound for example because it already has been stopped and freed internally or similar.
Position | sets the position of the sound in 3d space
SoundEffectControl | Returns the sound effect control interface for this sound. Sound effects such as Chorus, Distorsions, Echo, Reverb and similar can be controlled using this. This can be null if the sound has not been started with the flag 'enableSoundEffects' or the driver doesn't support effects.
Velocity | sets or returns the velocity of the sound in 3d space, needed for Doppler effects. To use doppler effects use ISound::setVelocity to set a sounds velocity, ISoundEngine::setListenerPosition() to set the listeners velocity and ISoundEngine::setDopplerEffectParameters() to adjust two parameters influencing the doppler effects intensity.
Volume | returns volume of the sound, a value between 0 (mute) and 1 (full volume). (this volume gets multiplied with the master volume of the sound engine and other parameters like distance to listener when played as 3d sound)

#### See Also

ISound Class | IrrKlang Namespace