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

XACT3: cues cause framerate drops on the 360

Last post 26/10/2009 0:13 by RandomTiger. 2 replies.
  • 25/10/2009 13:30

    XACT3: cues cause framerate drops on the 360

    My game is very simple and usually runs at 60 fps, however calling SoundBank.GetCue() (not cue.Play() ) for a moment causes my game to stall. This happens when I'm running the game on the 360 launched by from express, if I launch it directly from the 360 the frame rate doesnt drop but I get a lot of crackling on the audio.

    Can anyone help?

    public static void Play(string name)
            {
                if (BuildConstants.SOUND_ON && soundbank != null)
                {
                    Cue cue = soundbank.GetCue(name);
                    
                    if (m_cueHashset.ContainsKey(name))
                    {
                        m_cueHashset.Remove(name);  
                    }

                    m_cueHashset.Add(name, cue);
                    cue.Play();
                }
            }
  • 25/10/2009 19:03 In reply to

    Re: XACT3: cues cause framerate drops on the 360

    You never dispose the cues when they are done playing. When you remove the cue from the hash set, make sure to also dispose it!
    Also, are you calling AudioEngine.Update() often enough?

    Jon Watte, Direct3D MVP
    Tweets, occasionally
    kW X-port 3ds Max .X exporter
    kW Animation source code
  • 26/10/2009 0:13 In reply to

    Re: XACT3: cues cause framerate drops on the 360

    Thanks, the Dispose seems to have worked.
Page 1 of 1 (3 items) Previous Next