• reinei@lemmy.world
    link
    fedilink
    arrow-up
    10
    ·
    5 days ago

    But/and also also, just because you might know what a multiplication is you still might not know how to use that to make audio louder! (You might say “well just add to the loudness!” or if you actually know it’s not that easy you might say “just multiply it by 2!”, but the computer doesn’t simply take “audio” it takes some form of bytes in an array encoding said audio, let’s say PCM to make it easier, and you still need to know how to loop over that and multiply every value by 2 to double the physical volume.)

    • Tavi@lemmy.blahaj.zone
      link
      fedilink
      English
      arrow-up
      3
      ·
      5 days ago

      oh but don’t forget clipping and the fact that you now increased audio variance means the 10¢ tinny speakers at checkout cant power it, so now you have to work around perceptive loudness and normalize to speech frequencies and when you get to the shop to install new firmware you see a granny wearing glasses asking “what does the self checkout menu say?” and now you have a new problem.

    • addie@feddit.uk
      link
      fedilink
      arrow-up
      2
      ·
      5 days ago

      Man alive, don’t get the managers working with audio. “Doubling the stream” might work if you’re using a signed audio format rather than an unsigned one, and the format is in the same endianness as the host computer uses. Neither of which are guaranteed when working with audio.

      But of course, the ear perceives loudness in a logarithmic way (the decibel scale), so for it to be perceived as “twice as loud”, it generally needs an exponential increase. Very high and low frequencies need more, since we’re less sensitive to them and don’t perceive increases so well.