Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6827689
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T22:17:41+00:00 2026-05-26T22:17:41+00:00

How to play a background music and make it loop? Currently I’m using this

  • 0

How to play a background music and make it loop?

Currently I’m using this piece of code to make it play the background music:

XNA-C#

SoundEffect bgEffect;
bgEffect = Content.Load<SoundEffect>("EpicUnease");
bgEffect.Play(0.1f, 0.0f, 0.0f);
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T22:17:42+00:00Added an answer on May 26, 2026 at 10:17 pm

    If this is not XNA, you can reference System.Media and do this:

    SoundPlayer sound = new SoundPlayer("path");`
    sound.PlayLooping();
    

    For XNA you would do something like this:

    SoundEffect bgEffect;
    bgEffect = Content.Load<SoundEffect>("EpicUnease");
    SoundEffectInstance instance = bgEffect .CreateInstance();
    instance.IsLooped = true;
    bgEffect.Play(0.1f, 0.0f, 0.0f);
    

    For more information, check out this msdn article: http://msdn.microsoft.com/en-us/library/dd940203.aspx

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to play background music along with sound effects using Qt. However, I
I want to play background music in my game application using AVAudio player.I am
i am using a service in order to play background music, and i want
I'm currently using the SimpleAudioEngine to play a music file in my NSBundle (iphone)
I'm developing an iPhone game and currently using AVAudioPlayer for playing background music and
Does play automatically cache data? I'm trying to read this code that someone else
I am developing an entertainment app in android. I want to play background music,
I am using a service to run a background music for the whole application.
I'm using nAudio to play a background song in my WPF Application. Now to
I made a service that play background music, but when the music finished I

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.