Code Monkey home page Code Monkey logo

Comments (8)

friesencr avatar friesencr commented on May 4, 2024

A lot of times when a value gets rejected it means that the file wasn't suitable. If i load a png saved from gimp for instance I get those symptoms.

Is there anything in the logs?

from urho3d.

VladimirPobedinskiy avatar VladimirPobedinskiy commented on May 4, 2024

This is happens when scene autoupdate is enabled (CTRL+P)

from urho3d.

cadaver avatar cadaver commented on May 4, 2024

This is currently as expected. The SoundSource's attributes reflect the sound currently playing in realtime, so if you let the scene update itself, the play position gets incremented and when playback is finished, the sound is indeed cleared.

What kind of object are you trying to edit in the scene? For the whole scene, I would think it would only make sense to place looping ambient sounds (which should retain their sound assignments, but note that the play position still gets changed)

from urho3d.

VladimirPobedinskiy avatar VladimirPobedinskiy commented on May 4, 2024

I edit SoundSource3D. Also I change Sound Type and Sound field cleared.

from urho3d.

cadaver avatar cadaver commented on May 4, 2024

If I edit the sound type or other attributes with the scene paused (I had SmallExplosion.wav in a SoundSource3D), I don't see the sound resource getting cleared.

Can you state the whole usecase? Are you creating a particle effect, a weapon, or what kind of object that is using the sound? And why do you need the scene update enabled? I understand the sound getting cleared is undesirable, but it still helps to know what you're trying to achieve.

from urho3d.

VladimirPobedinskiy avatar VladimirPobedinskiy commented on May 4, 2024

OK, let's forget this problem. Simple mark in manual «Do not change SoundSource parameters when autoupdate is turned on.»
Now other problem:
I'm create AmbientSound component. It play sound sources from scene by random time.
All SoundSource3D in scene (in our scene ~40 ambiend sounds) start playing together when application load scene and start updating. I'm check by breakpoints - we are not call Play method on start. 40 rabid birds emit a hellish scream at the beginning of the game...

from urho3d.

VladimirPobedinskiy avatar VladimirPobedinskiy commented on May 4, 2024

void SoundSource::SetSoundAttr(ResourceRef value)
{
ResourceCache* cache = GetSubsystem();
Play(cache->GetResource(value.name_)); // This!
}

from urho3d.

cadaver avatar cadaver commented on May 4, 2024

You seem to be running engine version before fix. There should be "Is Playing" attribute visible on the sound components in the version after fix.

from urho3d.

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.