IrrKlang.NET

ISoundEngine.AddSoundSourceFromFile Method (String, StreamMode, Boolean)

Adds sound source into the sound engine as file.

[Visual Basic]
Overloads Public Function AddSoundSourceFromFile( _
   ByVal soundName As String, _
   ByVal streamMode As StreamMode, _
   ByVal preLoad As Boolean _
) As ISoundSource
[C#]
public ISoundSource AddSoundSourceFromFile(
   string soundName,
   StreamMode streamMode,
   bool preLoad
);

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