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

ffw/rwd and timing in XACT

Last post 7/15/2007 11:22 AM by kurli. 3 replies.
  • 7/15/2007 8:54 AM

    ffw/rwd and timing in XACT

    Hi,

    i'm making a demoscene demo (if you don't know what it is, just think it as a non-interactive techdemo or a music video running realtime) and the intention is to release in Assembly 2007. I have less than three weeks to complete, and i'm facing a serious problem with the direction and synching of the demo.

    In demos, especially in ours, one of the key elements is tight synchronization between the music and visuals. This usually means more or less hard coded events happening at certain points in time. On PC we've used quite much realtime FFT provided in f.ex. fmod, but XACT doesn't have any of that stuff.

    What i'd really need is the capability to fast forward / rewind the music, in order to be able to move to a certain point of time in the demo, hearing the music that should be playing on that particular time etc.


    The other thing i've noticed is that the gametime in XNA doesn't seem to be that accurate. I use this piece of code to convert the gametime to "music time":
    return (ms - starttime) / 60000.0 * bpm / 16.0;
    where ms is the current gametime in millisecond, and starttime is the time when the cue was fired. Bpm is the beats per minute assigned in Sony's Acid, which has always been very accurate. In the beginning everything is in synch, but as time advances it gets a little bit behind. Around 3-4 minutes it will be about 1 second behind, which is really bad if I were to make any synch between the music and visuals.

    I'm running the demo on XBOX 360, which is the intended platform. Haven't tested on PC.

    Please HALP!

  • 7/15/2007 9:45 AM In reply to

    Re: ffw/rwd and timing in XACT

    After some googling I found a solution to the second problem (gametime inaccuracy).
    Some nice fella had already found the same bug and also a way to fix it by using DateTime.UtcNow.Ticks instead of gametime.

    However, any hints on ffd/rwd with XACT is greatly appreciated.
  • 7/15/2007 9:53 AM In reply to

    Re: ffw/rwd and timing in XACT

    What you're looking for unfortunately isn't really possible with XACT.  If you are targetting windows and not the xbox360, then you can still use any of the managed audio libraries that are out there which would give you the features you are looking for.
    Joel Martinez - XNA MVP
    Blog: http://codecube.net
    XNA Unit Testing: Scurvy Test
  • 7/15/2007 11:22 AM In reply to

    Re: ffw/rwd and timing in XACT

    Yeah that's probably the only reasonable solution. I could use windows for the development phase at least. Any suggestions for such libraries?
Page 1 of 1 (4 items) Previous Next
var gDomain='m.webtrends.com'; var gDcsId='dcschd84w10000w4lw9hcqmsz_8n3x'; var gTrackEvents=1; var gFpc='WT_FPC'; /*<\/scr"+"ipt>");} /*]]>*/
DCSIMG