How to get the voice of microphone?
i want to get voice from my microphone and save it to Byte[] or stream so i can use UDP to send it through LAN ( a voice/video conference application i did the video part and i am stuck with voice )
i found some article but it is a C++
please any help
Krishnaraj LPosted Mar 5, 2007, 10:24 AM
You may have to convert all functionalities provided by Winmm.lib to managed ones in your C# application. List down all the functionalities which you need including the structures and convert that to managed types and use it.
eg:
--for functions from a dll
[DllImport("coredll.dll" /*you are specifying the dll name*/, EntryPoint="ShellExecuteEx" /*function to import*/)]
private unsafe static extern UInt32 ShellExecuteEx ( _SHELLEXECUTEINFO* pInfo );--for structures do like this-- please compare this with shellexecuteinfo structure documentation in MSDN, each item is changed to the managed types
[StructLayout(LayoutKind.Sequential)]
public unsafe struct _SHELLEXECUTEINFO{
public int cbSize; public UInt32 fMask; public UInt32 hwnd; public char* lpVerb; public char* lpFile; public char* lpParameters; public char* lpDirectory; public Int32 nShow; public IntPtr hInstApp; public IntPtr lpIDList; public char* lpClass; public IntPtr hkeyClass; public UInt32 dwHotKey; public IntPtr hIcon; public IntPtr hProcess;}
Let me know if this helps.
Best regards,
Krishnaraj L
Mike GoldPosted Mar 1, 2007, 1:34 PM
http://www.codeproject.com/audio/fister.asp?df=100&forumid=1790&exp=0&select=1127305
-Mike G