Monogame only playing about 3/4 of the whole sound effect

I need it to obviously play the entirety of the sound effect, but it stops near the end. It’ll play like 75% through it(background music) and then it’ll just loop back to the beginning. What’s going on? This has been a problem for a while now.

I’m not sure if you are using sound_fx or songs…? But you might have created a bad file to begin with.
You should check that your audio program isnt using some undesirable export method, like “cut remainder” or something.

Otherwise, put breakpoints on your ‘play’ commands, and see IF it is being called at the wrong time…
There must be line of code asking the sound or song to start over…

Yes I’m using sound effects.

I made it so it would only play once

if (dontRunThisCodeAgain == false){
dontRunThisCodeAgain= true;

But it’s still looping at the wrong time… I exported the .wav file with FL Studio(straight to .wav) and other times with Audacity(.mp3 to .wav)

but still nothing. I listen to the actual files and it plays the whole song(sound effect technically). Did my Content Pipeline for MonoGame go bad or something?? I’m confused.

And it doesn’t let me load “Songs” either…

Also I’ve played full songs that were around 5 minutes using SoundEffects, so this shouldn’t be a problem… I don’t know why this is occurring.

in fl studio i tried both of those rendering settings

Important note: It’s not even being called again. I made it to only play once, and it just stopped at 3/4 of the song.

Can you maybe share the sound file you are using. This should let us test it and figure out what the issue is?

lovely FL skin. And sorry if I’m taking this slowly and one step at a time, but thats all I have to offer right now.

But so as I understand it, you want to play a soundEffect to completion, and then loop it…
The trouble you are having is that it loops too soon.
You have made certain the file can in fact play to completion using a 3rd party media player - not FL, and not from code.

My next idea would be to
A) Dont loop the playback, and see if the sound plays to completion, as you would expect.
B) alter the length of the file you are using, and see if that alters the loop interval. I think that would tell us if the problem depends on the length of the file, or its a fixed problem in your code.

I already mentioned in the post I did test it without looping it. Instead of looping earlier it just stops early. And for B, I tried but there’s no way to tell where the interval is exactly without trying it multiple times and it just gets frustrating and it’s just now how it’s meant to be. I should be able to simply play a sound effect to its entirety without this kind of trouble, I used to be able to.