I'm facing a issue to sote the voice in my local db and folder please help me out in this i'm new for this plz help me plz
Can you give me the code to write in computer class
What I have tried:
[DllImport("winmm.dll", EntryPoint = "mciSendStringA", CharSet = CharSet.Ansi, SetLastError = true, ExactSpelling = true)]
private static extern int mciSendString(string lpstrCommand, string lpstrReturnString, int uReturnLength, int hwndCallback);
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
Computer computer = new Computer();
}
}
protected void btnRecord_Click(object sender, EventArgs e)
{
mciSendString("open new Type waveaudio Alias recsound", "", 0, 0);
mciSendString("record recsound", "", 0, 0);
}
protected void btnStop_Click(object sender, EventArgs e)
{
mciSendString("save recsound E:\\Railways\\Sound\\record.wav", "", 0, 0);
mciSendString("close recsound ", "", 0, 0);
Computer c = new Computer();
c.Audio.Stop();
}
protected void btnRead_Click(object sender, EventArgs e)
{
Computer computer = new Computer();
computer.Audio.Play("E:\\Railways\\Sound\\record.wav", AudioPlayMode.Background);
}
And also getting the error on AudioPlayMode Plz help me asap