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

Looping Short Cue

Last post 05-05-2008 12:56 AM by Phil Hansen. 2 replies.
  • 05-01-2008 5:11 PM

    Looping Short Cue

    Hi everyone,

    This is probably a simple question, but i hace a short cue that serves as the background music in my game, is there  any way to keep it looping?

     

    I tried this from an MS example:

    if (cue.IsPaused)
    {
    cue.Resume();
    }

    else if (cue.IsPlaying)
    {
    cue.Pause();
    }

    else
    {
    // If stopped, create a new cue.

    cue = sbank.GetCue("ArcticSong");

    cue.Play();
    }

     

    If anyone has any ideas they would be much appreciated!

     

  • 05-01-2008 5:13 PM In reply to

    Re: Looping Short Cue

    In XACT there is a property for looping a piece of audio, I believe. I'm not at home to look at the UI, but I'm pretty sure it's a property you can set on your sounds in the Sound Bank. Then when you play it, it will continue to loop as long as you hold the Cue reference.

    NickGravelyn -- Microsoft XNA MVP
    Blog | XNA Wiki | My Projects | FX-izer | Current Adventures | Next-Gen
  • 05-05-2008 12:56 AM In reply to

    Re: Looping Short Cue

    Check out this tutorial link.  About half way down the page it explains how to add looping to a sound.
Page 1 of 1 (3 items) Previous Next
var gDomain='m.webtrends.com'; var gDcsId='dcschd84w10000w4lw9hcqmsz_8n3x'; var gTrackEvents=1; var gFpc='WT_FPC'; /*<\/scr"+"ipt>");} /*]]>*/
DCSIMG