recording to .wav

Started by oscarSala,

oscarSala

Hi everyone,

I'm new to this and completely lost.
I'm working in vb.net.

Can someone give an example (or tell me where to find it) of how to record a mixer (to which I've added two channels, one for music and one for voice) to a WAV file?

Thanks a lot.

Ian @ un4seen

You can use the BASSenc add-on's BASS_Encode_StartPCMFile function to write the mixer output to a WAV file. For example:

wavwriter = BASS_Encode_StartPCMFile(mixer, 0, "mixer.wav")

The WAV file will then be written as the mixer is played/processed. Use BASS_Encode_Stop to close the WAV file when done.

In case you're using BASS.Net, that doesn't include support for the BASS_Encode_StartPCMFile function yet, but you can use BASS_Encode_Start with the BASS_ENCODE_PCM flag instead:

wavwriter = BassEnc.BASS_Encode_Start(mixer, "mixer.wav", BASSEncode.BASS_ENCODE_PCM, Nothing, IntPtr.Zero)

oscarSala