Home
Forum
Software
Mouser's Software
NANY: New Apps for the New Year
Friends of DC
Forum Coding Snacks
Editorials
Daily Blog
Monthly Newsletter
Mini Reviews
Favorite Websites
Archives
Articles
Historical Archives
Testimonials: What Folks Say About Us
Licensing
Get a License Key
Commercial Licensing
Help
Search
FAQs
DonationCoder Sitemap
Live Chat (Discord)
Contact Us
About Us
Donate
Home
Forum
Software
Mouser's Software
NANY: New Apps for the New Year
Friends of DC
Forum Coding Snacks
Editorials
Daily Blog
Monthly Newsletter
Mini Reviews
Favorite Websites
Archives
Articles
Historical Archives
Testimonials: What Folks Say About Us
Licensing
Get a License Key
Commercial Licensing
Help
Search
FAQs
DonationCoder Sitemap
Live Chat (Discord)
Contact Us
About Us
Donate
This topic
This board
Entire forum
Website and forum (google)
Member search
Welcome,
Guest
. Please
login
or
register
.
Did you miss your
activation email
?
1 Hour
1 Day
1 Week
1 Month
6 Months
Forever
Login with username, password and session length
Saturday December 14, 2024, 12:16 pm
Proudly celebrating 15+ years online.
Donate now
to become a lifetime supporting member of the site and get a non-expiring license key for all of our programs.
Forum Home
Search
Login
Register
Recent Topics
Go To..
Recently updated topics
Recent posts (compact)
Recent posts (full text)
DonationCoder.com Forum
»
DonationCoder.com Software
»
Coding Snacks
»
Play wave file through secondary sound card?
« previous
next »
New Topic
Print
Pages: [
1
] •
bottom
Author
Topic: Play wave file through secondary sound card? (Read 9318 times)
trw
Guest
Play wave file through secondary sound card?
«
on:
December 13, 2007, 08:36 AM »
I'm using WinLIRC to receive IR commands and cause UICE to execute "qwave.exe soundfile.wav". By this method I'm able to cause various short wave files to play upon receipt of specific IR commands from a remote. The problem is that these sounds are played through the default Windows sound device, whereas I want them to play through a secondary soundcard or external USB sound device. I've read that Winamp can play through alternate sound cards but it is too intrusive (opens and steals focus) and large (slow) for this application. I found the following old forum post which I think hints how it can be done. Any advice or solutions will be greatly appreciated!
(from
http://opensource.cr...04-March/007351.html
)
"
If you download the code from CVS (instructions at
http://www.openal.org/downloads.html
), you'll find the source code for
"altest" in openal/demos/altest/common/altest.cpp. During
initialization, you'll see a reference to enumeration -- that section
will show you how to use the context enumeration extension to enumerate
the various "devices" on your system.
These "devices" do not necessarily correspond with sound cards,
however. For instance, I have a computer at work with an NVIDIA
nForce2 and a Creative Audigy 2 in it. The devices enumerate and will
play back as follows:
Device Name / playback device
MMSYSTEM / whatever is the "preferred audio device" selected for Windows
DirectSound / "preferred audio device" as with MMSYSTEM
DirectSound3D / "preferred audio device" as with MMSYSTEM
NVIDIA nForce2 / always will play back on the nForce 2
Creative Audigy 2 / always will play back on the Audigy 2
On your system, if you have an nForce2 and a Creative card, then you'll
see explicit entries for those two cards on your device list. Any card
that doesn't have its own accelerated OpenAL implementation will have
to be selected by using one of the generic devices, which will follow
the "preferred audio device" selection in Windows."
Nod5
Supporting Member
Joined in 2006
Posts:
1,169
Re: Play wave file through secondary sound card?
«
Reply #1 on:
January 08, 2008, 04:15 PM »
Hi trw,
I don't have time to write it myself right now but here's a sketch for what I think would accomplish what you're after:
An autohotkey script that (1) changes the external USB device to default, (2) runs your qwave command, (3) changes the default device back to whatever it was. Autohotkey scripts for changing default device are available in this thread "Audio output device manager"
https://www.donation...dex.php?topic=8218.0
. Maybe you see how to put steps (1)-(3) together based on that info?
«
Last Edit: January 08, 2008, 04:17 PM by Nod5
»
Carol Haynes
Waffles for England (patent pending)
Global Moderator
Joined in 2005
Posts:
8,069
Re: Play wave file through secondary sound card?
«
Reply #2 on:
January 08, 2008, 05:01 PM »
Not the neatest solution (and probably no better than WinAmp) but Apple QuickTime can play WAV files and also allows you to set the sound device.
New Topic
Print
Pages: [
1
] •
top
« previous
next »
DonationCoder.com Forum
»
DonationCoder.com Software
»
Coding Snacks
»
Play wave file through secondary sound card?