IrrKlang.NET |

# ISoundEngine.AddSoundSourceFromIOStream Method

Adds a sound source into the sound engine from a IOStream. Note that the stream is totally read into memory when adding the sound source. If you want irrKlang to dynamically open and close custom file streams without loading everything into memory, use the addFileFactory with your own IFileFactory implementation.

[Visual Basic]
Public Function AddSoundSourceFromIOStream( _
ByVal stream As Stream, _
ByVal soundName As String _
) As ISoundSource
[C#]
public ISoundSource AddSoundSourceFromIOStream(
Stream stream,
string soundName
);

#### Return Value

Returns the pointer to the added sound source or 0 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