GithubHelp home page GithubHelp logo

channel default volume is unusual about m5unified HOT 5 OPEN

belm0 avatar belm0 commented on May 23, 2024
channel default volume is unusual

from m5unified.

Comments (5)

belm0 avatar belm0 commented on May 23, 2024 1

I have no doubt that multi-channel, 16-bit sound can be handled well within fixed-point, 32-bit operations. (The PlayStation or early consoles and sound cards had no floating point hardware, etc.)

To start, 32-bit dynamic range is really not needed for volume.

from m5unified.

lovyan03 avatar lovyan03 commented on May 23, 2024

@belm0
Thank you for your important input.
I apologize for any inconvenience caused by my ignorance of standard audio designs thinking.
I will review the volume settings in the next version and set the default channel volume to 255.

By the way, the volume value is calculated internally as a square ( volume ^ 2 ) . In other words, the output varies quadratically.
Both master volume and channel volume.
Do you have any opinions or generalizations about this process?

from m5unified.

belm0 avatar belm0 commented on May 23, 2024

By the way, the volume value is calculated internally as a square ( volume ^ 2 )

I was going to say something about this requiring a 64-bit intermediate value for each sample unless some optimizations are done, but then I realized that the code is using a float buffer. I'm a little surprised because float is not very fast on ESP32, so I guess this is a luxury sound library 😉

from m5unified.

lovyan03 avatar lovyan03 commented on May 23, 2024

@belm0
Oh.. yes, I was reluctant to use floats, but I couldn't think of a better way.
In fact, I've been racking my brains because I later realized that the float operation is even slower in ESP32C3…😨

from m5unified.

mdxs avatar mdxs commented on May 23, 2024

This ticket can be closed as resolved. Suggesting to create a new ticket if there is a reason to keep track of looking into the use of integers instead of floats (as discussed a bit in comments to this ticket).

from m5unified.

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.