BB FlashBack SDK: FBRecorder |
InitCustomSoundTrack Description Initialises the name, sample size, stereo/mono and frequency for the sound track that will be added by calls to AddSoundBlockByPointer during recording. This method should only be called before recording starts. To enable adding a custom sound track, the UseCustomSoundTrack property should be set to true before recording starts. Syntax [C#/C++] [VB.NET] Parameters trackname (in): the name of the new track samplesize (in): should have value 8 or 16, indicating the number of bits in each sample stereo (in): True or False to indicate whether the track is stereo or mono frequency (in): frequency of the samples, in KHz. e.g. 22050, 44100 Remarks Samples are added via the AddSoundBlockByPointer method. The samplesize and stereo parameters affect the number of bytes in each sample. 8 bit mono = 1 byte
per sample Sample Code Setup the custom sound track before recording starts. recorder.InitCustomSoundTrack(L"testtrack", sample_size, false, frequency); recorder.UseCustomSoundTrack = true; Then Start recording. When recording is in progress, sound is added with AddSoundBlockByPointer:
// generate example sound data - a sine
wave Return Values True if successful, False if not. See Also FBRecorder::AddSoundBlockByPointer FBRecorder::UseCustomSoundTrack
|
|