Git Product home page Git Product logo

Comments (8)

flibitijibibo avatar flibitijibibo commented on July 23, 2024

Oh, so it really does forcibly Play no matter what? That probably sounds heavenly when a PC can't play things:

https://github.com/flibitijibibo/FNA/blob/master/src/Media/Xiph/Song.cs#L314

This will take a fair amount of work to fix, because our internal Update depends very much on the idea of it stopping once we've hit the end of the buffer list:

https://github.com/flibitijibibo/FNA/blob/master/src/Audio/DynamicSoundEffectInstance.cs#L273

My recommendation is to either submit a couple buffers before playing or use BufferNeeded (the latter of which is what they wanted you to do anyway):

https://msdn.microsoft.com/en-us/library/microsoft.xna.framework.audio.dynamicsoundeffectinstance.bufferneeded.aspx

from fna-mghistory.

Enichan avatar Enichan commented on July 23, 2024

Yeah, this almost seems like one of those things where maybe being accurate to XNA4 isn't the best idea in the world. On the other hand, I do see why they went for this solution, in a threaded situation the sound may stop before your background thread filling buffers adds more, cutting off the sound entirely, which would be undesirable.

from fna-mghistory.

flibitijibibo avatar flibitijibibo commented on July 23, 2024

On the bright side, this did get me to look at the documentation one more time as well as AL accuracy:

3250b6c
fc0df4f
3670357

from fna-mghistory.

lagsalot avatar lagsalot commented on July 23, 2024

Found my way here from playing Gnomoria under OS X, in which the sound cuts out consistently. Is this related? Is there a better place to bring up this bug/behavior?

from fna-mghistory.

flibitijibibo avatar flibitijibibo commented on July 23, 2024

I doubt it - the Gnomoria DynamicSoundEffectInstance only affects the music tracks, and cutouts there would mean skipping to entirely different songs. Odds are it's because the Mono runtime's garbage collector is halting all the threads, but that should only be for Boehm... the runtime I gave Rob uses SGen instead. In any case, that's more indicative of bad CPU or memory performance, rather than an issue with FNA's audio playback functionality.

from fna-mghistory.

flibitijibibo avatar flibitijibibo commented on July 23, 2024

Did you manage to work around this for MidBoss? I might be able to check this out for FNA 1.0 if I have time, but if you have the game working again then I'll just copy this issue over when recreating the repository and we'll deal with it later.

from fna-mghistory.

Enichan avatar Enichan commented on July 23, 2024

Yeah I wound up scrapping the system I had because I found out I could use Renaud's OggStreamer stuff. Unlike MonoGame, it runs fine alongside FNA, so I'm good.

from fna-mghistory.

flibitijibibo avatar flibitijibibo commented on July 23, 2024

Turns out this wasn't terribly hard to fix anyway:

ba5e117

Now I can see why having it always Playing can be helpful, but detecting when it's stopped is kind of awful. Oh well...

from fna-mghistory.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.