Click here to Skip to main content
15,907,905 members
Home / Discussions / C#
   

C#

 
AnswerRe: sound card Pin
DaveyM693-Apr-10 3:23
professionalDaveyM693-Apr-10 3:23 
I've never used it for audio, only MIDI which is in the same dll so I assume the principal is the same.

You use the xxxGetNumDevs function to get the number of devices installed. Each of these devices are assigned an ID from 0 to numDevs - 1.

You can call xxxGetDevCaps to get the name and other capabilities of the In or Out device using the ID.
To use the device you call xxxOpen using the ID which will give you an IntPtr which you use to identify the device for all other functions, and you specify a delegate in this function too which will be called for all events of the device (hint: watch out as callbacks may be on a different threads for different events!).

You will need to look in MMSystem.h and this MSDN page[^] to figure out all your P/Invoke signatures and structures.
Dave

If this helped, please vote & accept answer!


Binging is like googling, it just feels dirtier. (Pete O'Hanlon)

BTW, in software, hope and pray is not a viable strategy. (Luc Pattyn)

QuestionCtrl+Z character in C# Pin
Kujtim Hyseni2-Apr-10 8:43
Kujtim Hyseni2-Apr-10 8:43 
AnswerRe: Ctrl+Z character in C# Pin
Ravi Bhavnani2-Apr-10 9:13
professionalRavi Bhavnani2-Apr-10 9:13 
GeneralRe: Ctrl+Z character in C# Pin
PIEBALDconsult2-Apr-10 10:03
mvePIEBALDconsult2-Apr-10 10:03 
GeneralRe: Ctrl+Z character in C# Pin
Ravi Bhavnani2-Apr-10 10:07
professionalRavi Bhavnani2-Apr-10 10:07 
GeneralRe: Ctrl+Z character in C# Pin
The Man from U.N.C.L.E.2-Apr-10 10:47
The Man from U.N.C.L.E.2-Apr-10 10:47 
GeneralRe: Ctrl+Z character in C# Pin
Khaniya2-Apr-10 18:33
professionalKhaniya2-Apr-10 18:33 
GeneralRe: Ctrl+Z character in C# Pin
Rajesh Anuhya2-Apr-10 22:23
professionalRajesh Anuhya2-Apr-10 22:23 
AnswerRe: Ctrl+Z character in C# Pin
Richard MacCutchan2-Apr-10 23:26
mveRichard MacCutchan2-Apr-10 23:26 
QuestionSetting the region of a computer from a C# program... Pin
glauben2-Apr-10 8:37
glauben2-Apr-10 8:37 
AnswerRe: Setting the region of a computer from a C# program... Pin
Ravi Bhavnani2-Apr-10 9:14
professionalRavi Bhavnani2-Apr-10 9:14 
GeneralRe: Setting the region of a computer from a C# program... Pin
glauben2-Apr-10 11:12
glauben2-Apr-10 11:12 
AnswerRe: Setting the region of a computer from a C# program... Pin
PIEBALDconsult2-Apr-10 10:11
mvePIEBALDconsult2-Apr-10 10:11 
GeneralRe: Setting the region of a computer from a C# program... Pin
glauben2-Apr-10 10:19
glauben2-Apr-10 10:19 
GeneralRe: Setting the region of a computer from a C# program... Pin
PIEBALDconsult2-Apr-10 10:47
mvePIEBALDconsult2-Apr-10 10:47 
GeneralRe: Setting the region of a computer from a C# program... Pin
Mycroft Holmes2-Apr-10 22:36
professionalMycroft Holmes2-Apr-10 22:36 
GeneralRe: Setting the region of a computer from a C# program... Pin
glauben4-Apr-10 15:12
glauben4-Apr-10 15:12 
GeneralRe: Setting the region of a computer from a C# program... Pin
Mycroft Holmes4-Apr-10 15:34
professionalMycroft Holmes4-Apr-10 15:34 
QuestionDS virtual capture device Pin
kennyhibs2-Apr-10 8:34
kennyhibs2-Apr-10 8:34 
AnswerRe: DS virtual capture device Pin
Migounette3-Apr-10 10:40
Migounette3-Apr-10 10:40 
QuestionListView control in Csharp smart device [modified] Pin
Tunisien862-Apr-10 4:59
Tunisien862-Apr-10 4:59 
AnswerRe: ListView control in Csharp smart device Pin
Luc Pattyn2-Apr-10 5:09
sitebuilderLuc Pattyn2-Apr-10 5:09 
GeneralRe: ListView control in Csharp smart device Pin
Tunisien862-Apr-10 5:29
Tunisien862-Apr-10 5:29 
AnswerRe: ListView control in Csharp smart device Pin
Ravi Bhavnani2-Apr-10 7:01
professionalRavi Bhavnani2-Apr-10 7:01 
GeneralRe: ListView control in Csharp smart device Pin
Tunisien862-Apr-10 9:12
Tunisien862-Apr-10 9:12 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.