Hello
I am a beginner in Csharp, I'd like to know how to handle multiple sound cards (both input and output), more clearly how can I select a sound card among those I have using Csharp,I need your help please
Loading
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
VulpesRank #55 · 29.2K reputationPosted Mar 4, 2011, 2:09 AM EST
nicole castel163 reputationPosted Mar 4, 2011, 2:50 AM EST
yes I must prepare a software as a final study project and the manager told me to use Csharp because it's a widely used in computer science so I have to learn how to use this language quickly :)
i'm using Windows 7
VulpesRank #55 · 29.2K reputationPosted Mar 4, 2011, 6:24 AM EST
nicole castel163 reputationPosted Mar 4, 2011, 7:21 AM EST
PS: i Konow That i have a bad English so please excuse me
nicole castel163 reputationPosted Mar 4, 2011, 7:29 AM EST
Sam HobbsRank #107 · 20.5K reputationPosted Mar 4, 2011, 8:29 PM EST
In both Windows and Unix/Linux and in most modern operating systems, there must be a device driver (that is what they are called in both Windows and Unix/Linux) that acceses devices. I am sure you are not developing a device driver.
Back in the days of DOS and 16-bit Windows Game developers would access hardware directly since they needed the best performance possible. So for 32-bit Windows Microsoft had to do something. They purchased software that the renamed DirectX. So you need to look at DirectX and whatever else might exist to replace DirectX. I am not sure whether there is something available for managed code that replaces DirectX but I know that DirectX has a few limitations that Microsoft needs to do something to replace DirectX. I think that for sound you need to look for DirectSound. Look for articles in this web site that show how to use sound in C#. Note that at least one article shows how to use the computer's speaker to make a simple piano; you don't want to use the computer's speaker.
nicole castel163 reputationPosted Mar 5, 2011, 1:29 AM EST
FroglegRank #1,020 · 1.9K reputationPosted Mar 5, 2011, 1:56 AM EST
http://blogs.microsoft.co.il/blogs/tamir/archive/2008/12/25/capturing-and-streaming-sound-by-using-directsound-with-c.aspx
nicole castel163 reputationPosted Mar 5, 2011, 2:26 AM EST
but i have a problem with DirektX,it gives allways an error
FroglegRank #1,020 · 1.9K reputationPosted Mar 5, 2011, 2:35 AM EST
http://msdn.microsoft.com/en-us/library/bb324497(v=vs.85).aspx
nicole castel163 reputationPosted Mar 5, 2011, 3:02 AM EST
FroglegRank #1,020 · 1.9K reputationPosted Mar 5, 2011, 3:32 AM EST
using System.Media;
SoundPlayer simpleSound = new SoundPlayer(your sound file);
simpleSound.Play();
nicole castel163 reputationPosted Mar 5, 2011, 3:57 AM EST
Suthish NairRank #92 · 22.8K reputationPosted Mar 7, 2011, 9:19 AM EST
nicole castel163 reputationPosted Mar 7, 2011, 10:27 AM EST
nicole castel163 reputationPosted Mar 7, 2011, 10:27 AM EST
Sam HobbsRank #107 · 20.5K reputationPosted Mar 7, 2011, 12:34 PM EST
nicole castel163 reputationPosted Mar 7, 2011, 10:31 PM EST
i want to do the both,if you want i can send you the subject of my project to get a clear idea
FroglegRank #1,020 · 1.9K reputationPosted Mar 8, 2011, 7:31 AM EST
http://www.c-sharpcorner.com/UploadFile/GemingLeader/696/