PlaySoundFile

[b][red]This message was edited by Wizardy at 2003-10-19 23:4:33[/red][/b][hr]
Hi!

I have this function:
[CODE]
void PlaySoundFile (const char *SoundFile)
{
if (!PlaySound (SoundFile, NULL, SND_FILENAME | SND_ASYNC))
{
printf ("Error occured!");
}
}
[/CODE]

If this function is run in win98, the sound file will not be played. There's always that message "error occured!". Why is that so? Should I initialize sound device? How do I do that, if I have to?

And, one more thing. Will I'll be able to play .mp3 files with this function? If not, which function do play .mp3 files and how to use it.

Thanks!


Comments

  • You needn't initialize sound device. I have ever tested this function in win98, it's ok. so please check the file path parameter you send to the function.
    you could get some other play sound ways at:
    http://www.qinysoft.com/articles/vcsound.htm
  • : You needn't initialize sound device. I have ever tested this function in win98, it's ok. so please check the file path parameter you send to the function.
    : you could get some other play sound ways at:
    : http://www.qinysoft.com/articles/vcsound.htm
    :

    File path is OK. That's for sure. Any other idea, why it is not working? Did you test this function in win98?
  • you know what's a great API for playing sounds (especially Mp3)?

    FMOD

    http://www.fmod.org

    It's fast, easy, and well documented. Free for the most part, check the license agreement to see if it fits your needs.

    Good luck!
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories