GithubHelp home page GithubHelp logo

Cached sound system about finch HOT 6 CLOSED

DevHead1 avatar DevHead1 commented on August 14, 2024
Cached sound system

from finch.

Comments (6)

zoul avatar zoul commented on August 14, 2024

The expected scenario is that you load all sounds when your app starts, so that you don’t need a cache. Do you have a use case where you need caching?

from finch.

DevHead1 avatar DevHead1 commented on August 14, 2024

Thanks, I could probably do that, but I'm not loading all sounds when the app starts.
Simply because I might have to play multiple instances of the same sound at the same time.
And I don't really know how many instances I will need.
I might have to play 10 or 20 instances that might overlap.

And when the sound is done playing, I delete it. But, reloading the sound over
and over again slows everything down. So, I guess what I need is a manager that can
hold multiple instances of the same sound. And maybe load more if I need them, or keep
the ones I just played in memory.

from finch.

zoul avatar zoul commented on August 14, 2024

The method for loading sounds takes a maxPolyphony argument that makes it possible to play up to maxPolyphony instances of the same sound at the same time. The memory overhead for high polyphony numbers should be pretty low, that was one of the points of the recent rewrite. Would a sound with a high polyphony number solve your problem?

from finch.

DevHead1 avatar DevHead1 commented on August 14, 2024

Thanks, that might help. I was using FISound instead of FIRevolverSound.

I guess I had the wrong impression of what FIRevolverSound actually did,
so I didn't use it the first time I saw it.

from finch.

DevHead1 avatar DevHead1 commented on August 14, 2024

Problem solved. Consider this thread closed.

from finch.

zoul avatar zoul commented on August 14, 2024

Great. Please just note that the the API changed a few days ago, the FIRevolverSound class is not needed anymore. You can continue using the old version, just the memory requirements will be higher.

from finch.

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.