<xml> </xml>

IrrKlang.NET |

# ISoundSource Properties

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

#### Public Instance Properties

AudioFormat

Returns informations about the sound source: channel count (mono/stereo), frame count, sample rate, etc. Returns the structure filled with 0 or negative values if not known for this sound for example because because the file could not be opened or similar. Note: If the sound never has been played before, the sound engine will have to open the file and try to get the play lenght from there, so this call could take a bit depending on the type of file.

DefaultMaxDistance

Sets or gets the default maximal distance for 3D sounds played from this source. This value influences how loud a sound is heard based on its distance. See ISound::setMaxDistance() for details about what the max distance is. This method only influences the initial distance value of sounds. For changing the distance after the sound has been started to play, use ISound::setMaxDistance() and ISound::setMaxDistance().

DefaultMinDistance

Sets or gets the default minimal distance for 3D sounds played from this source. This value influences how loud a sound is heard based on its distance. See ISound::setMinDistance() for details about what the min distance is. This method only influences the initial distance value of sounds. For changing the distance after the sound has been started to play, use ISound::setMinDistance() and ISound::setMaxDistance().

DefaultVolume | Sets or gets the default volume for a sound played from this source. The default value of this is 1.0f. Note that the default volume is being multiplied with the master volume of ISoundEngine, change this via ISoundEngine::setSoundVolume(). The volume is a value between 0 (silent) and 1.0f (full volume).
ForcedStreamingThreshold |

IsSeekingSupported

Returns if sounds played from this source will support seeking via ISound::setPlayPosition(). If a sound is seekable depends on the file type and the audio format. For example MOD files cannot be seeked currently. Returns true of the sound source supports setPlayPosition() and false if not. Note: If the sound never has been played before, the sound engine will have to open the file and try to get the information from there, so this call could take a bit depending on the type of file.

Name | Returns the name of the sound source (usually, this is the file name)

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 lenght reporting or it is a file stream of unknown size. Note: If the sound never has been played before, the sound engine will have to open the file and try to get the play lenght from there, so this call could take a bit depending on the type of file.

SampleData |

StreamMode

Sets or returns the stream mode which is used for a sound played from this source. Note that if this is set to ESM_NO_STREAMING, the engine still might decide to stream the sound if it is too big. The threashold for this can be adjusted using ISoundSource::setForcedStreamingThreshold(). Note: If the returned type is ESM_AUTO_DETECT, this mode will change after the sound has been played the first time.

#### See Also

ISoundSource Class | IrrKlang Namespace