Central Music Sound Cards & Media Devices Driver



  1. My Sound Card Driver
  2. Install Sound Card Driver
  3. Central Music Sound Cards Youtube
  4. Computer Music Sound Cards
  5. Central Music Sound Cards Online

A couple of years ago, it was really tricky to record the audio that was currently being played in your speakers thanks to the sound card of your computer using C#. Fortunately with the matter of time, an useful API was introduced to Windows Vista. The Windows Audio Session API (WASAPI) is Microsoft's most modern method for talking with audio devices. It is available in Windows Vista, Windows 7, and later versions of Windows. It allows delivering an unmodified bitstream to a sound device, and provides benefits similar to those provided by ASIO drivers. NAudio offers a really useful wrapper around this API that allows you to record the audio from your soundcard easily with C#.

Central Music Sound Cards & Media Devices Driver

In this article, we'll show you how to record the audio that's coming from your sound card using NAudio with C# in WinForms.

Right-click the listing for your sound card or audio device, then select Update driver Browse my computer for driver software Let me pick from a list of device drivers on my computer. Select the audio device whose driver you want to update, select Next, and then follow the instructions to install it. The PC-USB connection on your Rotel device has two USB settings. The default setting is USB Class 1.0, which supports audio up to 96kHz. In order to support 192kHz audio, your Rotel device must be set to USB Audio Class 2.0 in the setup menu, and if you are using a Windows PC you must also make sure the USB 2.0 drivers are installed. Also, you may need to adjust the sample.

1. Install NAudio with NuGet

You will need to install the NAudio library in your project using the NuGet package manager. Open your Winforms C# project and open the NuGet package manager in the solution explorer:

Central music sound cards free

Go to the Browse tab and search forNAudio:

My Sound Card Driver

From the list, select the NAudio package by Mark Heath and install it simply clicking on the Install button. Once the installation finishes you will be able to import the Wave namespace of NAudio in the class where you want to use it like this:

If you already have NAudio installed, then you can proceed with the next step.

2. Understand recording audio logic

Thanks to NAudio, most of the hard logic behind the complex process of recording the audio coming out from your speakers (sound card) has been fortunately abstracted and written in a way that almost every developer can understand and use. The WasapiLoopbackCapture is the class from NAudio that you will use to record it, this class is a very well writen wrapper of the WASAPI (Windows Audio Session API) that can be used together with some file writer classes of NAudio to record easily the audio from the default sound source of your system.

The logic that you will need to handle to record the audio is minimal, initially, you need to create an instance of the WaveFileWriter and the WasapiLoopBackCapture classes.l The WaveFileWriter expects as first argument the path where the wav file should be written (the one with the recorded audio from the speakers/sound card) and as second argument the WaveFormat property of the capturer instance. Doing this, you're ready to write the sound coming from the sound card, however it isn't done automatically as you need to attach a listener to the capturer instance, namely the DataAvailable. This event is triggered when the some audio is received, in this callback you need to use the audio writer, providing as first argument of the write method, the buffer and the offest of the recorded bytes and the recorded bytes itself. You need as well dispose the audio writer once the capturer stops so the file can be accessible. Finally, you can simply start the recorder using the StartRecording method.

It's worth to say that the code is asynchronous, so you don't need to care basically about threading or other complex stuff (maybe initially):

To stop the audio recording, you would simply run the StopRecording method of the capturer:

Install Sound Card Driver

The buffer writing in the desired file will stop, producing a wav file with the audio produced from your system during the execution of the process. Obviously, don't forget to play some audio while you test or you will hear nothing !

Full example

In this example, we are going to simply create a form with 2 buttons, one to start the recorder (button1) and other to stop it (button2). The Stop button is initially disabled and it will enabled once the recorder starts and viceversa with the start button. Graphically the form looks like:

Central Music Sound Cards Youtube

The logic that we'll implement is very simple, yet functional. When the user clicks on start, the audio of the system will be recorded and when the user clicks on stop, the recorder stops and finishes the writing buffer of our desired output Audio file. The instances of WaveFileWriter and the WasapiLoopbackCapture are meant to be accesible at class level, so our start and stop button have access to them, they're because of this behaviour originally set to null.

Computer Music Sound Cards

As next, attach a click listener to both buttons and assign the logic respectively. For the start button, define a variable that contains the path to the output audio file and redefine the WaveFileWriter and the WasapiLoopbackCapture instances with a new one. Then, attach the onDataAvailable and onRecordingStopped callbacks to the capturer instance and write the logic respectively, in this case when the data is available, write the output buffer into the declared file used by the wave writer. When the recording stops it should obviously dispose the capture instance. Finally when the user clicks on the stop button, the recorder instance should simply stop the recorder, disabling as well the stop button and enabling the start button again so a new file can be recorded again:

Central music sound cards & media devices drivers

Central Music Sound Cards Online

Happy coding !