maoca
Member
- Joined
- Oct 30, 2023
- Messages
- 5
- Programming Experience
- Beginner
hi everyone.
I'm a very beginner in object programming and I would like to record audio from my computer to save a wav file. I found this light library BasicAudio (GitHub - blakepell/BasicAudio: A simple class library that facilitates recording audio in Windows desktop applications.)
I would like to chage the properties of the object, but I don`t know what I doing bad:
Could help me?
thanks
I'm a very beginner in object programming and I would like to record audio from my computer to save a wav file. I found this light library BasicAudio (GitHub - blakepell/BasicAudio: A simple class library that facilitates recording audio in Windows desktop applications.)
I would like to chage the properties of the object, but I don`t know what I doing bad:
C#:
using static BasicAudio.Recording;
namespace BasicAudio_1
{
internal class Program
{
static void Main(string[] args)
{
// There are properties on this object to change the quality recording
var audioRecorder = new BasicAudio.Recording();
audioRecorder.Filename = @"c:\tmp\test.wav";
audioRecorder.Channels = ChannelValue.Stereo;
audioRecorder.BitsPerSample = BitsPerSampleValue.High;
audioRecorder.SamplesPerSecond = SamplesPerSecValue.High;
audioRecorder.StartRecording();
Thread.Sleep(5000);
// File is written out to disk when this is called. The filename property must already be set.
audioRecorder.StopRecording();
}
}
}
thanks
Last edited by a moderator: