Copyright © 2005-2018 MultiMedia Soft

SoundGenerator.StreamCreateMultiChannelEmpty method

Previous pageReturn to chapter overviewNext page

Remarks

 

Creates and loads into the given player a new and empty multi-channel (up to 7.1) audio stream that may host the following kinds of sound generators on allocated channels:

 

- Pure wave tones through the SoundGenerator.StreamChannelAddTone method

- Sliding wave tones through the SoundGenerator.StreamChannelAddSlidingTone method

- Noises through the SoundGenerator.StreamChannelAddNoise method

- DTMF tones through the SoundGenerator.StreamChannelAddDtmfString method

- Text to speech through the SoundGenerator.StreamChannelAddSpeechFromString and SoundGenerator.StreamChannelAddSpeechFromFile methods.

 

Once created and filled with needed sound generators, the audio stream can be played through the PlaySound method, paused through the PauseSound method and stopped through the StopSound method. Once no more needed, the audio stream can be discarded from memory through the CloseSound method.

 

For further details about sound generation see the SoundGenerator object and the How to generate wave tones, noises, DTMF tones and text to speech tutorial.

 

 

Syntax

 

[Visual Basic]

Public Function StreamCreateMultiChannelEmpty (

nPlayerIndex as Int16,

nSampleRate as Int32,

nChannels as Int16

) as enumErrorCodes


 

[C#]

public enumErrorCodes StreamCreateMultiChannelEmpty (

Int16 nPlayerIndex,

Int32 nSampleRate,

Int16 nChannels

);


 

[C++]

public: enumErrorCodes StreamCreateMultiChannelEmpty (

Int16 nPlayerIndex,

Int32 nSampleRate,

Int16 nChannels

);


 

Parameter

Description

 

 

nPlayerIndex

Number representing the zero-based index of the involved player

nSampleRate

Sample rate of the stream, e.g. 44100

nChannels

Number of channels of the audio stream.

Supported values are the following:

Value

Meaning

1

Mono audio stream

2

Stereo audio stream

4

3.1 audio stream

6

5.1 audio stream

8

7.1 audio stream

 

 

Return value

 

Value

Meaning

 

 

Negative value

An error occurred (see the LastError property for further error details)

enumErrorCodes.NOERROR (0)

The method call was successful.