Method: NewWaveFile


Function:

 

Create a new wave file.

     

Parameters:

 

fileName: The name of the file to create. If a file with the same name exists, it will be deleted.

nChannels: The number of channels in the wave format. Default 1 (Mono).

nSamsPerSec: The sample rate in KBits per second. Default: 8K.

nBitsPerSam: The number of bits per sample. Default: 16

     

Description:

 

This method should be used after the current line has been set.The last three parameters give the wave format of the new wave file.If the last three parameters are all set to zero (the default), then the standard format (8K sample rate,16bit,Mono) will be used. With the Voice modem this is the only format that can be used. With a Sound Card, all kinds of formats can be used. To know more about the wave formats, see 'Handling .WAV files and waveforms' and check your recording software, which may be capable of converting formats for you.

     

Dependencies:

 

None.

     

Events Raised:

 

None.

     

Sample Code In Visual Basic:

'The following code creates a new file and then begins recording to the wave file.

Sub VoiceAngel1_DigitDetected(LineIndex as integer ,sDigit as String)

   If sDigit="1" Then

     VoiceAngel1.CurrentLineIndex = LineIndex

     VoiceAngel1.NewWaveFile "Record.wav,0,0,0"    

     VoiceAngel1.StartRecording 0,False

   End if

End sub