I need to record the sounds on windows. I need to write to stream what I hear from speakers.
What means/API can I rely on?
You may be able to make use of DirectSound; a sample can be found here which is working against a mic. The CaptureDevicesCollection should have a reference to the needed device you want to capture audio from to change from a mic to something else.
Related
Im trying to play the Windows Hardware Sounds using a C#(.net) Console Application. But I can only find how to play the beep sound using SystemSounds.
I tried to use SystemSounds for this, but it can only do the Beep Sound using
SystemSounds.Exclamation.Play();
I think a more general solution would be to play the wanted sounds by using a SoundPlayer object, where the only thing you need is the wanted sound file.
You'll be able to reuse this component in a future case where you'd like to play other sounds.
How to play a sound in C#, .NET
Hope that helps.
I want to display the spectrum of output audio of my windows C# application. Currently i am using NAudio Library to calculate information through PCM data of input file. But it seems that this process is taking a lot of time and processing in older systems configurations. So i was wondering if i can use the windows audio output data to do so. I meant this.
As you can see windows is generating green bar of current sound output. And it does recognize multiple outputs in MIXER. So is there any way to get this data and use in my application to escape extra calculation? And i haven't posted any code or my work as i am not sure how to do that and if that is even possible so kindly bear with me.
Thank. You.
Take a look at Stereomix which echos the computer's output as an input device. Listening to this input will be the probably easiest way to detect sounds playing. Also take a look at Loopback Recording.
Is a way of creating a program (either in C(+,++,#) or VB.net) that would be able to send a beep sound through the same line-in that is being used for audacity (not stereo mix)?
I am trying to make a way of syncing up audio and video from 2 different programs, in a similar way that a clapper bored works in the movies.
Would there be a way of using a sort of microphone enhancement that could be created because they affect the microphone input?
I assume you're trying to implement something like http://www.singularsoftware.com/pluraleyes.html then? I think the best way would be to write a VST/LADSPA plug-in for Audacity that inserts the beeps synced to a timecode stream (or whatever you're syncing to).
There's a neat little library called VST.NET that allows you to write VST plug-ins in standard C#/VB.NET if you like.
I poked around for a while on Google and Windows Media player looking for a way to do this, but I can't and I think I should be able to, so I'm asking the fine people of StackOverflow.
I'd like to be able to write some code to do one of the following:
Add an audio file from my WMP media library to the current "Play To" playlist.
Add an audio file from the file system to the current "Play To" playlist.
It doesn't really matter to me which of these I use for my approach. Can anyone give me some direction? I'm guessing I'm going to have to dig into the Windows Media Player DLLs, but a starting point would be really helpful.
As far as I know, there is no easy way to do this. I guess you could try wrapping this in C#, but it isn't that documented.
Imagine this scenario: You have a desktop and a laptop. The desktop has a high end set of speakers, the laptop does not. You currently use Synergy to share your mouse and keyboard, but audio is a problem.
Is there a way in C# to create a client that captures all of the sound on a PC(I'm thinking like a virtual sound card) and streams it to server that hosts the real sound card?
Not a programming solution - but airfoil with airfoil speakers will do what you want and it's not expensive.
http://rogueamoeba.com/airfoil/speakers.php
Streaming sound shouldn't be a problem if you design something like a ring buffer in case you have lags in the network to avoid breaking the sound wave.
For capture though, I don't see any easy solution short of creating a virtual WDM driver that you put on top of the sound card (either input or output) you want to capture.
There is AirFoil, as morechilli mentioned. It works with minimal setup, however the output is very noticeably latent.
The PulseAudio project might hold the key to low-latency. A lot of relevant questions on SuperUser.
I'm not sure if this is the solution you're looking for, but I quite often shoutcast over my home network using winamp and the shoutcast server. If it's just music you want to listen to, this will do the trick. However (and I admit I have not tested this), you can tell the encoder what to listen to - normally you just get it to listen to the output buffer of winamp, but there is a setting that allows it to listen to the output to your soundcard.
http://www.shoutcast.com/download
Yeah, you write a driver that is a virtual sound card and IPC's off the information to a service that streams the data out.