How do I change my Active Sound Card on the Fly? - windows

I currently have speakers set up both in my office and in my living room, connected to my PC via two sound cards, and would like to switch the set of speakers I'm outputting to on the fly.
Anyone know an application or a windows API call that I can use to change the default sound output device? It is currently a bit of a pain to traverse the existing control panel system.

That topic is covered in depth here Easily Change or Switch the Default Audio Sound Output in Vista or XP. Note that sound management was changed in Vista significantly.
On a side note, I believe SnapStream is/was working on an application to allo multi-channel sound cards to output to different rooms (sets of speakers) simultaneously.

Related

How can I monitor Line In input with Realtek audio? (New Windows driver removed option to unmute it)

I connect a MacBook through a 3.5mm jack cable to another computer's line in input jack in the motherboard which has Realtek Audio (Windows). This enables me to use a pair of speakers connected to this last PC and hear both mac and pc through the same speakers simultaneously.
I used to be able to go the Speaker Properties panel and unmute the Rear Input. This way it uses direct monitoring so you don't experience any latency on the macbook's playback.
Some time ago a driver update seems to have removed the Level fader of the inputs together with its mute toggle :O
Now, to achieve the same, I'm only left with this option which introduces latency in the audio playback:
Enabling Listen to this device in the Rear input Recording properties.
So is there another way to regain this functionality?
Is there something like what's suggested in this other question?
Unmute audio input (microphone) in OSX programatically
Basically some command to unmute the direct monitoring of the Line In audio input on Windows, or maybe an app that controls the drivers?
Realtek audio console doesn't provide this option :(
Thanks!
I just had the same problem, but it's not because of the driver. The culprit is the new realtek audio control which has removed the lever for audio monitoring level. You have to use an old version of realtek control panel to make it work.
For example try downloading audio drivers for this motherboard
https://www.asrock.com/mb/intel/Z97M%20Pro4/index.la.asp#Download
Unzip it and look for the file RAVCpl64.exe under the Vista64 folder.
Run this and you'll get the good old control panel back! Works like a charm.
I suggest you put a shorcut on your desktop for ease of access.
I just did this and uninstalled the new control panel which sucks.
I wonder why Realtek chose to remove functionality from their software, really bad idea!

Get info of currently playing song OSX

I am currently trying to write a music visualizer of sorts, but I am running into a small issue.
I am familiar with the scripting bridge and being able to get various information from iTunes regarding the current track but I wanted to add support for other media players such as Spotify.
Since the Pause/Play, Next track, and Previous track buttons on the built in keyboard automatically direct the corresponding commands to the last used media player, I was assuming that there is a single library that I can call against to get this information, regardless of which music player is playing music.
Since the Pause/Play, Next track, and Previous track buttons on the built in keyboard automatically direct the corresponding commands to the last used media player, I was assuming that there is a single library that I can call against to get this information, regardless of which music player is playing music.
Unfortunately, this is a false assumption.
The media keys on the keyboard are weird. They are (unfortunately!) not part of any larger media API; the fact that they even work at all for programs other than iTunes has taken some significant effort by developers.
iTunes publishes some information on the current track through a distributed notification. You can also get the name of the current track through AppleScript. This isn't part of any larger standard, though; other audio player applications may or may not do anything similar.

Record audio in background

I'm wondering if anyone has any idea that capture audio from the device's microphone on the new Windows Phone 7 in background (Silverlight, not XNA)
or any code to do it?
Even in a Silverlight application, the Microphone is accessed via libraries in the Microsoft.Xna.* namespaces.
The use of such namespaces is not supported in a Background Task. See http://msdn.microsoft.com/en-us/library/hh202962(v=vs.92)
This is not possible and would break the security principle of not allowing apps to do something that the user isn't aware of.

Selecting input mic for Mac Audio Queue Services?

I am currently using the Mac OS X Audio Queue Services API for audio recording and sound analysis. Works fine using the default mic input.
If there is more than one microphone plugged into the Mac (USB, headset jack, etc.), is there a way to programmatically enumerate and select which mic is to be used for audio input within an application? (e.g. not have to send the user to the system preferences panel, which may affect a users other audio applications.) If so, which APIs should be used to select the mic input.
To enumerate available input devices please see my answer to AudioObjectGetPropertyData to get a list of input devices.
Once you've determined the input device you'd like to use, you can set the kAudioQueueProperty_CurrentDevice property to the device's UID.
I fear, no, because AQ is hard-coded to use default input (to my best knowledge). AQ is fairly limited and only iOS gives more control via AutoSessions. However, you can use AUHAL to record from an arbitrary device:
http://developer.apple.com/library/mac/#technotes/tn2091/_index.html
You won't need listing 4 from above because you'll use the AudioDeviceID for the device you have chosen (presumably by getting the list of devices using AudioObjectGetPropertyDataSize and picking the one you want).
FWIW: if you decide that's too much, you can presumably still use AudioHardwareSetProperty to set kAudioHardwarePropertyDefaultInputDevice from your code - not what you wanted but certainly less work...
If you set up the Audio Queue to read from the default input device, then it will read from the mic that is selected as default in the System Preferences->Soubd->Input tab.

Windows Phone 7 Volume Settings programmatically

Is there a way to programmatically change the sound settings of Windows Phone 7? Enable or disable sounds for Appointment and all other notifications? Also to change the global volume i.e.:Ring tone.
There is no API to enable the tasks that you've mentioned. You can adjust the sound volume for the sounds within an application by using the XNA API's, but that is the extent of the control that is currently available.
You can control the volume of the media player and of a sound affect, but you don't have control over the master volume. Also note there is a bug in the sound drivers on some HTC devices that causes them to ignore the volume setting on sound affects.

Resources