IrrKlang.NET

ISoundEngine.AddSoundSourceFromFileMethod(String, StreamMode, Boolean)

Adds sound source into the sound engine as file.

[VisualBasic]
OverloadsPublicFunctionAddSoundSourceFromFile( _
ByVal soundNameAsString,_
ByVal streamModeAsStreamMode,_
ByVal preLoadAsBoolean_
)AsISoundSource
[C#]
publicISoundSourceAddSoundSourceFromFile(
stringsoundName,
StreamModestreamMode,
boolpreLoad
);

Parameters

soundName
Name of the sound file (e.g. "sounds/something.mp3"). You can also use this name when calling play3D() or play2D().
streamMode
Streaming mode for this sound source
preLoad

Return Value

Returns the added sound source or null if not sucessful because for example a sound already existed with that name. If not successful, the reason will be printed into the log.

See Also

ISoundEngine Class | IrrKlang Namespace | ISoundEngine.AddSoundSourceFromFile Overload List