I want to measure a system's speaker volume by playing a sound and listening for it on a local microphone at the same time. This is for a specific application. The exact recorded sound is not as important as differentiating between the microphone volume recorded before the sound is played and while it is playing.
The idea is to warn the user if speakers are turned off or too low. How can I record a sound while playing it and determine a difference in volume? Are there are any managed libraries to do this?
Update: Found a good related question.
Take this:
http://windowsmedianet.sourceforge.net/
and use waveIn managed wrapper.
http://msdn.microsoft.com/en-us/library/ms712636(VS.85).aspx
Of course, you'll need some calibration there...
Related
I would like to make an Equalizer app for Windows and apply settings for sound system. I've found many sound API like WASAPI, DirectSound but I don't know if I can use there to apply a filter in real time for all sounds. On C# there is CSCore to manipulate Audio sources but I don't know if I can use it for device.
The other solution is to create a virtual sound device on Windows. It get the actual sound output, transform it with a filter in real time and output this sound. But I don't know where to start to do this. This thing suppose to change to C++ but it is possible in C#?
I want to record sound to a file and at the same time I want to be able to play audio from the same file in C#
For example, play the last 15 seconds but the microphone has to keep on registering and recording while replaying.
Is this possible and in that case, which is the best approach to do this?
The answer is YES, and you should play around with low level audio API, namely WaveIn/Out functions from winmm.dll, through P/Invoke in C#.
In short words, you need to use WaveIn to capture input signal from a input device and store in some structure, then use WaveOut to play back the audio simultaneously, or some delay after.
Here is a project you can start with: a duplex audio player. You can download the project and play around with it and see how it achieves it, then do some modifications upon the project to achieve what you want :)
In our solution we need to play sound on one of the recording devices.
For this purpose we are using VAC (Virtual Audio Cable), but we have a problem that it creates noise in the output.
Is it possible to play audio to recording device in C#?
Is there some existing library for that or virtual audio driver is required?
There are useful 3rd-party-tools & APIs in a question was asked earlier:C# Audio Library.
I hope you find what you want.
We used NAudio library to play sound on a specific playback device.
By default VAC is duplicating audio from playback device to recording device, so by playing it on virtual device it's also played on recording device.
How can I playback audio to a non-default playback device in .net? Help would be wonderful! Audio playback to the default playback device is easy, however machines can have multiple playback devices for many reasons, and many common application allow selecting a non-default device for playback and recording. Is there a way to do this hopefully avoiding pinvoke? media foundation or core audio? Thank you in advance.
KindReality,
This might be useful to you. NAudio has seemingly already wrapped up a few API's for you (and, I imagine, handles those low level calls so you don't have to). Scrolling down to "NAudio Features" will most likely reveal whether or not this is what you're looking for.
I've managed to write program to record sound from Input Devices, but I'm more interested in recording from one window that plays some sounds. Is it possible to catch those sounds and not all possible sounds played currently?
Sorry for my english.
As the program you want to record is talking directly to the sound driver api your only chance would be to create an own "man in the middle" sound driver which could filter off and forward an audio stream to your application.
So if you are not planning to invest a serious amount of time the answer probably is "No, its not possible".