Hi Stephan, There is a way to first check if a computer has a sound card. Try to use WaveOutGetNumDevs and WaveInGetNumDevs - they return the number of audio playing devices (Out) and the number of recording devices (In). Try to use it like this: if WaveOutGetNumDevs=0 then application.messagebox('Error', 'No sound playing card', mbOK). $72 / €64 / £56. Be one of the first people in the world to get your hands on the Mooltipass Mini! Extra cards: add Fr.

is soundcard?

hi is there a way to first check if a computer has a sound card before i try
to play a sound, i have some users who don't have sndcards, and this creates
an error on their systems.

i tried using the sndplaysound api aswell, but this creates the same error

thank you

Re:is soundcard?


With a try Except block try to create a TMediaPlayer object and then test
boolean value like (mpCanPlay in MP.Capabilities)
Quote
Stephan Johnson wrote in message <[email protected]>...
>hi is there a way to first check if a computer has a sound card before i
try
>to play a sound, i have some users who don't have sndcards, and this
creates
>an error on their systems.

>i tried using the sndplaysound api aswell, but this creates the same error

>thank you

Re:is soundcard?


sorry i forgot to remove one of my old media player code snippets, this is
what created the error,

sndplaysound works

sorry

Quote
'Stephan Johnson' <[email protected]> wrote in message
news:[email protected]
Quote
> hi is there a way to first check if a computer has a sound card before i
try
> to play a sound, i have some users who don't have sndcards, and this
creates
> an error on their systems.

> i tried using the sndplaysound api aswell, but this creates the same error

> thank you

Re:is soundcard?


Quote
Stephan Johnson wrote:
> hi is there a way to first check if a computer has a sound card before i try
> to play a sound, i have some users who don't have sndcards, and this creates
> an error on their systems.
i:=waveoutgetnumdevs;
if i>0 then playsound

Tomy

Tomy.vcf
< 1K Download

Re:is soundcard?


Hi Stephan,

There is a way to first check if a computer has a sound card.
Try to use WaveOutGetNumDevs and WaveInGetNumDevs - they return
the number of audio playing devices (Out) and the number of recording devices
(In).

Try to use it like this:
if WaveOutGetNumDevs=0 then application.messagebox('Error', 'No sound playing
card', mb_OK);
if waveInGetNumDevs=0 then application.messagebox('Error','No recording sound
card',mb_ok);

The best place for this code would probably be in the On Create handler for the
form.

Alain.S

What kind of sound do you want?

Quote
Stephan Johnson wrote:
> hi is there a way to first check if a computer has a sound card before i try
> to play a sound, i have some users who don't have sndcards, and this creates
> an error on their systems.

> i tried using the sndplaysound api aswell, but this creates the same error

> thank you

Re:is soundcard?


thanks, i will try this, but i think i have come right with the sndplaysound
api,

i have a small autorun app which my company uses on cd's created with
information for our customers, it plays a bit of sound on start and end, and
on the click of the links

Quote
'Alain.S' <[email protected]> wrote in message
news:[email protected]
Quote
> Hi Stephan,

> There is a way to first check if a computer has a sound card.
> Try to use WaveOutGetNumDevs and WaveInGetNumDevs - they return
> the number of audio playing devices (Out) and the number of recording
devices
> (In).

> Try to use it like this:
> if WaveOutGetNumDevs=0 then application.messagebox('Error', 'No sound
playing
> card', mb_OK);
> if waveInGetNumDevs=0 then application.messagebox('Error','No recording
sound
> card',mb_ok);

> The best place for this code would probably be in the On Create handler
for the
> form.

> Alain.S

> What kind of sound do you want?

> Stephan Johnson wrote:

> > hi is there a way to first check if a computer has a sound card before i
try
> > to play a sound, i have some users who don't have sndcards, and this
creates
> > an error on their systems.

> > i tried using the sndplaysound api aswell, but this creates the same
error

> > thank you

1. Sound with pci-soundcards

2. A wellknwon problem: the soundcard

3. Using Soundcard Sound Programming in Turbo Pascal 7

Stephan Kappertz Sound Cards & Media Devices Driver

4. Free code : Playing sound on sb-compatible soundcard

Stephan

5. Soundcard

6. soundcard programming

7. SoundCard 'rectifier'

Stephan Kappertz Sound Cards & Media Devices Driver

8. SoundCard in TP

9. Sound I/O via soundcard

StephanStephan Kappertz Sound Cards & Media Devices driverStephan

10. Getting soundcard output signal

Stephan Kappertz Sound Cards & Media Devices Drivers