Thread: Sound problem...

  1. #1
    Registered User
    Join Date
    Nov 2005
    Posts
    673

    Sound problem...

    Ok, I am sorry for making new thread for this but I found nothing in a search. if I use this function to play a sound.
    Code:
    mciSendString ( "Play song.mid", 0, 0, 0 );
    is there any way to preload the song, so the program doesnt have to load during run-time? I dont mind with .mid files, there isnt any delay there, but with mp3 or wav I need them to be preloaded to be able to have split second song play. Well thank you for any help you may provide.
    Last edited by Raigne; 08-31-2006 at 09:25 PM.

  2. #2
    Registered User VirtualAce's Avatar
    Join Date
    Aug 2001
    Posts
    9,607
    DirectAudio offers much more flexibility with sound and may be easier to use. Other than that all I can say is consult the multi-media portion of the Platform SDK.

  3. #3
    Registered User
    Join Date
    Nov 2005
    Posts
    673
    hmmm... I might try to figure out direct audio... DirectX is so complicated though, but thanks for the reply. Ill try it, and see waht happens

  4. #4
    Registered User
    Join Date
    Nov 2005
    Posts
    673

    problem...

    Ok, well umm do I have to use MSVC++ to be able to use DirectX? Casue it isnt working...

  5. #5
    Registered User VirtualAce's Avatar
    Join Date
    Aug 2001
    Posts
    9,607
    .............

  6. #6
    Registered User
    Join Date
    Oct 2001
    Posts
    2,934
    Gee Bubba, that's real helpful.

  7. #7
    Registered User VirtualAce's Avatar
    Join Date
    Aug 2001
    Posts
    9,607
    Well since we don't have an animation of a person's jaw dropping on the floor and the forum won't accept just 3 dots or so, I used about 12.

  8. #8
    Registered User
    Join Date
    Nov 2005
    Posts
    673
    ... I have a feeling that niether of those comments helped, and I am not sure what to do. I installed the DirectX9.0 SDK, and linked the libraries, and include, folders, but I get one error in particular, it says WLOOP changes the meaning of struct member WLOOP, so if that helps any please respond.

  9. #9
    Registered User VirtualAce's Avatar
    Join Date
    Aug 2001
    Posts
    9,607
    Well since your second post has not addressed any specific problem with DirectSound, how do you expect me to help you? DirectMusic/Sound is huge. There are a bunch of ways to do play sounds, music, etc. I have no way of knowing how you setup DirectMusic or DirectSound to work, no idea about what you are actually trying to do other than just play a sound.

    If you really want the answers you seek I suggest purchasing DirectX 9 Audio Exposed on www.amazon.com. It's only about 20 to 25 dollars and well worth every penny of it.

    It will answer far more than I ever could in one thread. In fact I'd say it's impossible to explain DirectAudio in one thread.

  10. #10
    Registered User
    Join Date
    Nov 2005
    Posts
    673
    Well, I used the example code , and just changed the filepaths, but it didnt work, and I guess Ill buy that and see how it works, thanks forthe help bubba
    [edit]
    should I install the retail or debug version ( that might have something to do with it)
    [/edit]
    Last edited by Raigne; 09-02-2006 at 01:50 PM.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 5
    Last Post: 11-07-2005, 11:34 PM
  2. searching problem
    By DaMenge in forum C Programming
    Replies: 9
    Last Post: 09-12-2005, 01:04 AM
  3. Bin packing problem....
    By 81N4RY_DR460N in forum C++ Programming
    Replies: 0
    Last Post: 08-01-2005, 05:20 AM
  4. Words and lines count problem
    By emo in forum C Programming
    Replies: 1
    Last Post: 07-12-2005, 03:36 PM
  5. half ADT (nested struct) problem...
    By CyC|OpS in forum C Programming
    Replies: 1
    Last Post: 10-26-2002, 08:37 AM