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

  • SEARCH
  • Home
  • 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 694009
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T02:48:46+00:00 2026-05-14T02:48:46+00:00

Using XNA 4.0, I am currently playing songs from the user’s PC/XBox360 using the

  • 0

Using XNA 4.0, I am currently playing songs from the user’s PC/XBox360 using the following:

        Microsoft.Xna.Framework.Media.MediaPlayer.Play(Song song);

I see that MediaPlayer has a static Property PlayPosition that, as I’ve researched, used to be a get/set property, but it has been updated to get-only.

Are there any other methods/tricks I can use to explicitly set the playing position of a currently playing song?

  • 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-14T02:48:46+00:00Added an answer on May 14, 2026 at 2:48 am

    It looks liked they added a DynamicSoundEffectInstance class in XNA 4.0. One of the member functions is SubmitBuffer, which allows you to set the “Offset, in bytes, to the starting position of the data.”

    Please note that I haven’t tried this out yet, and I couldn’t tell you how to get your audio into a buffer of bytes (maybe you can read it from a XACT wavebank somehow?). It’s also probably going to be a pain to do this because it doesn’t look like you can remove the buffer if you decide to change position again. You would have to either let it play to the end or create a new class and submit a new buffer with a new offset. So you could keep your byte buffer in memory, and just pass it to new DynamicSoundEffectInstance classes with a new offset each time you wanted to change position.

    Like I said, I haven’t tried this out yet, and I’m just going by the documentation on MSDN. I searched around for a while, and Shawn Hargreaves said back in October ’09 before XNA 4.0 came out that he doesn’t think this can be done. Since the PlayPosition is still a get only property in XNA 4.0, I don’t think you’ll have any luck there, but the DynamicSoundEffectInstance is new and may give you what you need.

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

Sidebar

Related Questions

I want to get started doing some game development using Microsoft's XNA. Part of
I am currently writing a Particle System using XNA. What I'd like to do
I am currently developing a game using XNA (School project), and I was wondering
I'm currently writing a small online game using c# XNA and lidgren and I
in my spare time I'm engaged with writing a little game using Microsofts XNA
I'm using C# WinForms to create a level builder for my XNA game. I
I am currently working on a Level Editor for XNA which is built by
I'm currently working on a XNA game prototype. I'm trying to achieve a isometric
I'm using Windows 7 (all latest updates installed), and currently have DirectX 11 installed
Using online interfaces to a version control system is a nice way to have

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.