Copyright © 2001-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]

control.SoundGenerator.StreamCreateMultiChannelEmpty (

nPlayer as Integer,

nSampleRate as Long,

nChannels as Integer

) as enumErrorCodes


 

[C++]

short control.SoundGenerator.StreamCreateMultiChannelEmpty (

short nPlayer,

long nSampleRate,

short nChannels

);


 

Parameter

Description

 

 

nPlayer

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, check the LastError property value in order to get the error code

enumErrorCodes.ERR_NOERROR (0)

The method call was successful