XNA Creators Club Online
Page 1 of 1 (3 items)
Sort Posts: Previous Next

Play Audio from offset (i.e. 10 seconds into the filelength)

Last post 6/14/2008 9:59 PM by Ashu Tatake. 2 replies.
  • 6/4/2008 10:37 AM

    Play Audio from offset (i.e. 10 seconds into the filelength)

    Hi there,

     is there a way to play a audio file from an offset. Like start my file at position 0m 10sec instead of 0m 0sec.

    I have two background music tracks which are just variations of each other. What I am trying to do is play musik one, and at any given time switch over to music variation 2 at the current position of music variation 1.

    Is it maybe possible to attach a variable with an effekt in the XACT tool. Any Hacks? Ideas?

    I need XBox360 and PC support.

     

    Thanks for your help :-)
  • 6/4/2008 2:25 PM In reply to

    Re: Play Audio from offset (i.e. 10 seconds into the filelength)

    I'm not aware of any way to do this.

    Please file a suggestion on connect if you'd like to see this feature added in a future framework version.


    XNA Framework Developer - blog - homepage
  • 6/14/2008 9:59 PM In reply to

    Re: Play Audio from offset (i.e. 10 seconds into the filelength)

    You might want to take a look at the Interactive Audio cues in XACT. In the cue properties you can mark a cue as an IA cue. This cue type allows you to setup different types of transitions between the cue sounds. For example you can make "marker aligned transitions" and the marker events can be at different time offsets.The IA variable connected to the cue allows you to control these transitions from your game.

    http://msdn.microsoft.com/en-us/library/bb172321(VS.85).aspx

    Ashu Tatake
    XNA Framework Developer
Page 1 of 1 (3 items) Previous Next