R
Robert Gravereaux
I'm putting together a C# .Net forms project on win2k. The application
requires some sort of horn sound. I've never implemented any audio in .Net,
so I'm not sure how best to accomplish this.
It's an application that works with a wireless barcode scanner, in a
warehouse environment. The user could be potentially 20 or 30 ft. from the
PC. If the user scans something improperly, the app should sound a 'horn' to
notify the user. I'm trying to accomplish this with the standard sound card
and speakers supplied with the PC.
The optimal solution would be to play my horn sound at a volume level
totally (or at least mostly) independent of any other sounds being played
through the sound card and speakers. But I don't think this can be done -
all wave files, for example, play at the same mixer level in windows. Any
ideas?
AFAIK, I could:
1) use the PlaySound() api to play a .wav file. The downside of this is that
the volume of all windows sounds will be approximately the same as the horn
sound.
2) Use waveOutSetVolume() in combination with PlaySound() to raise and lower
the wave volume before and after playing the horn sound. The downside is
that the app is increasing the volume of all wave audio while the horn sound
is being played.
3) Create a horn sound that is a MIDI sound and use the MCI APIs to play the
sound. Then the windows mixer can be used to adjust levels between the MIDI
and wave channels.
4) Use a second sound card, and use PlaySound() with this device.
I'm curious:
1) Is there a way to control the relative level of individual wave sounds,
such that I can play a specific wave file something like 10 times louder
than the rest of the windows sounds?
2) Is it possible to create my own mixing device, such that I can play a
wave sound without regard to the rest of the volumes already defined by the
windows mixer?
Any thoughts would be appreciated.
__________________________
Rob Gravereaux
Principal Developer
Glen Road Systems, Inc.
http://www.grsinc.com
requires some sort of horn sound. I've never implemented any audio in .Net,
so I'm not sure how best to accomplish this.
It's an application that works with a wireless barcode scanner, in a
warehouse environment. The user could be potentially 20 or 30 ft. from the
PC. If the user scans something improperly, the app should sound a 'horn' to
notify the user. I'm trying to accomplish this with the standard sound card
and speakers supplied with the PC.
The optimal solution would be to play my horn sound at a volume level
totally (or at least mostly) independent of any other sounds being played
through the sound card and speakers. But I don't think this can be done -
all wave files, for example, play at the same mixer level in windows. Any
ideas?
AFAIK, I could:
1) use the PlaySound() api to play a .wav file. The downside of this is that
the volume of all windows sounds will be approximately the same as the horn
sound.
2) Use waveOutSetVolume() in combination with PlaySound() to raise and lower
the wave volume before and after playing the horn sound. The downside is
that the app is increasing the volume of all wave audio while the horn sound
is being played.
3) Create a horn sound that is a MIDI sound and use the MCI APIs to play the
sound. Then the windows mixer can be used to adjust levels between the MIDI
and wave channels.
4) Use a second sound card, and use PlaySound() with this device.
I'm curious:
1) Is there a way to control the relative level of individual wave sounds,
such that I can play a specific wave file something like 10 times louder
than the rest of the windows sounds?
2) Is it possible to create my own mixing device, such that I can play a
wave sound without regard to the rest of the volumes already defined by the
windows mixer?
Any thoughts would be appreciated.
__________________________
Rob Gravereaux
Principal Developer
Glen Road Systems, Inc.
http://www.grsinc.com