Thread: DirectMusic headaches...

  1. #1
    Used Registerer jdinger's Avatar
    Join Date
    Feb 2002
    Posts
    1,065

    DirectMusic headaches...

    I've got my DM tech fully coded and it works except that I can't
    get it to play more than one segment. If I load only one segment
    it plays with no problems.

    The problem is when I try to load more than one and play them in
    turn (ie: Main Menu theme, Combat theme, etc.). They should
    play when the game state changes.

    I've made sure to stop the playing segment before
    playing the new one. When loading more than one it compiles
    with no problems, it just doesn't play anything.

    I haven't found any tutorials that cover playing more than one
    segment. They all give generic examples with just one.

    Also, I've tried adding an additional port and that didn't fix it
    either.

    Anyone have any experience with this? If need I can post the
    code, but it's pretty much just the standard DM and COM init stuff
    shown in the DX SDK.

    Thanks in advance for any help!

  2. #2
    Used Registerer jdinger's Avatar
    Join Date
    Feb 2002
    Posts
    1,065
    Got it. I was trying to use more than one segment and (though
    I'm sure it's possible) I couldn't get it. But I've found a work-
    around.

    When the gamestate changes I stop the segment, then load the
    new midi into the original segment and play it. Just have to
    reload it everytime it changes. Only 3 extra lines of code.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. DirectMusic engine problem
    By VirtualAce in forum Game Programming
    Replies: 7
    Last Post: 03-17-2005, 06:12 PM
  2. DirectSound vs DirectMusic
    By Trauts in forum Windows Programming
    Replies: 3
    Last Post: 10-05-2003, 05:49 PM
  3. Confusion with DirectMusic tutorial
    By Hunter2 in forum Game Programming
    Replies: 0
    Last Post: 06-09-2003, 09:24 PM
  4. DirectSound vs. DirectMusic
    By Hunter2 in forum Game Programming
    Replies: 3
    Last Post: 06-05-2003, 04:30 PM
  5. Streaming not necesary in DirectMusic 9?
    By Anonymous Cowar in forum Windows Programming
    Replies: 1
    Last Post: 03-16-2003, 11:16 AM