Results 1 to 8 of 8

Thread: Playing Sounds and Resource Files [RESOLVED]

  1. #1

    Thread Starter
    PowerPoster Keithuk's Avatar
    Join Date
    Jan 2004
    Location
    Staffordshire, England
    Posts
    2,236

    Playing Sounds and Resource Files [RESOLVED]

    I've made many apps that play wave files. I don't have a problem with this. I've also made a res file with the sounds for the same app. The problem is, I have a card game and when you win you get an applause sound and the screen fills with the card backs sequentially.

    Playing a wave file no problem. The sound is heard and the graphics show normally. Playing the wave file from the res file the app doesn't play the file quick enough. It slows the graphics down when I need to play sounds. The winning card display is done through a timer. I've added DoEvents in the timer and at other places in the app, but this makes no difference.

    Is there any way I can speed up the res file access?

    I have other apps with this same problem. Anything with movement and sounds. Any help would be appreciated.
    Last edited by Keithuk; Feb 4th, 2004 at 03:44 PM.

  2. #2
    Frenzied Member
    Join Date
    May 2003
    Location
    Sydney
    Posts
    1,123
    maybe the comp config is not good enuf to handle all the processings at the same time. i dont know u're comp's specs so its just a thought.

  3. #3
    Supreme User Madboy's Avatar
    Join Date
    Oct 2003
    Location
    England
    Posts
    3,253
    How are you loading the res sound files? See attached example, may be of better use than your current method
    Attached Files Attached Files

  4. #4

    Thread Starter
    PowerPoster Keithuk's Avatar
    Join Date
    Jan 2004
    Location
    Staffordshire, England
    Posts
    2,236
    I am playing the sounds exactly the same as Madboy's sndres.

    Comp spec:
    Windows 98se
    256 RAM
    AMD K6-2 550Mhz
    Visual Basic 6 Pro

  5. #5
    Supreme User Madboy's Avatar
    Join Date
    Oct 2003
    Location
    England
    Posts
    3,253
    Hehehe, well im using:

    Win98 Se
    128.0Mb ram
    586Mhz Intel Celeron
    Visual Basic 6 Enterprise

    If you like send me the project and ill see if it runs slow on my computer

  6. #6
    PowerPoster
    Join Date
    Jun 2001
    Location
    Trafalgar, IN
    Posts
    4,141
    Are you extracting the wav file just before using it? If so maybe you could extract the wav files during the form load and store them in variables until you need them.

  7. #7

    Thread Starter
    PowerPoster Keithuk's Avatar
    Join Date
    Jan 2004
    Location
    Staffordshire, England
    Posts
    2,236
    I said I was using the same res call as Madboy's. I've since check this and I wasn't using SND_NODEFAULT. This has made a big difference. I was only using SND_MEMORY Or SND_ASYNC

    Thanks Madboy.

  8. #8
    Supreme User Madboy's Avatar
    Join Date
    Oct 2003
    Location
    England
    Posts
    3,253
    your welcome, your the first to actually appreciate my help

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width