Thread: Question on sound in a game of mine.

  1. #1
    Registered User
    Join Date
    Jan 2002
    Posts
    25

    Question Question on sound in a game of mine.

    I am using the PlaySound function to play a .wav file of an explosion within a Battleship game I made for class. The problem I am having is that a section of code will not run until the .wav file is done playing. I am trying to call the PlaySound function to play the .wav file while a for loop displays a flashing HIT or MISS message. But the loop won't start until after the sound has played. Is there anyway I can play the sound while the loop is executing.

    Thanks,
    Van

  2. #2
    Banned master5001's Avatar
    Join Date
    Aug 2001
    Location
    Visalia, CA, USA
    Posts
    3,685
    Of course, but you won't like it

    Use a different function that is asynchronous. Open AL should be good enough for your game. Otherwise use dx. Sorry it wasn't simpler.

  3. #3
    Neoseeker's master master2000's Avatar
    Join Date
    Dec 2002
    Posts
    101
    master5001 you work for nintendo
    i own a gamecube say what language is it writen on.
    Last edited by master2000; 12-09-2002 at 01:17 PM.
    missles on metriods

  4. #4
    Banned master5001's Avatar
    Join Date
    Aug 2001
    Location
    Visalia, CA, USA
    Posts
    3,685
    Actually I've seen some stuff that goes with the GC SDK. You can use C/C++ to write GC games, but I do GBA mostly using C and assembler.

  5. #5
    Neoseeker's master master2000's Avatar
    Join Date
    Dec 2002
    Posts
    101

    Cool

    cool
    missles on metriods

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. 2D RPG Online Game Project. 30% Complete. To be released and marketed.
    By drallstars in forum Projects and Job Recruitment
    Replies: 2
    Last Post: 10-28-2006, 12:48 AM
  2. Sound Driver Programming Question
    By phos2k in forum Linux Programming
    Replies: 1
    Last Post: 11-10-2003, 11:07 PM
  3. Question on sound in a game of mine
    By Vanished in forum Game Programming
    Replies: 2
    Last Post: 12-09-2002, 01:56 PM
  4. Very simple question, problem in my Code.
    By Vber in forum C Programming
    Replies: 7
    Last Post: 11-16-2002, 03:57 PM
  5. Question about a game
    By TheGr8one in forum Game Programming
    Replies: 1
    Last Post: 09-15-2001, 10:44 PM