c# - wav File not saving using mciSendString -


i using mcisend method record wav file problem file not saving.my code is:

using system; using system.collections.generic; using system.componentmodel; using system.data; using system.drawing; using system.linq; using system.text; using system.threading.tasks; using system.windows.forms; using system.speech.recognition; using system.speech.synthesis; using microsoft.visualbasic.devices; using system.runtime.interopservices; public class form1  {  [dllimport("winmm.dll", entrypoint="mcisendstringa")] private static extern int mcisendstring(string lpstrcommand, string    lpstrreturnstring, int ureturnlength, int hwndcallback);  private void button1_click(object sender, system.eventargs e)  { // record microphone mcisendstring("open new type waveaudio alias recsound", "", 0, 0); mcisendstring("record recsound", "", 0, 0); }   private void button2_click(object sender, system.eventargs e)  { // code not working mcisendstring("save recsound d:\\myfile.wav", "", 0, 0); mcisendstring("close recsound", "", 0, 0); } } 

code giving no error not creating file @ above path.


Comments

Popular posts from this blog

Fail to load namespace Spring Security http://www.springframework.org/security/tags -

sql - MySQL query optimization using coalesce -

unity3d - Unity local avoidance in user created world -