Giter VIP home page Giter VIP logo

Comments (1)

kcat avatar kcat commented on July 17, 2024

The ALC_SOFT_loopback extension allows mixing audio to your own buffer, to do with what you want. You're responsible for outputting it to be heard, though. Either using a second OpenAL device with a single source, or a different audio API.

Be aware that using an FFT to split the audio like you want won't be easy, and likely have a fair bit of latency. Simply taking the FFT, reading and removing low frequencies, then reversing it back to samples, will result in aliasing issues. Each processed chunk won't properly follow from each other since, from the perspective of the FFT, the samples in a given chunk are their own self-contained looping signal, which they aren't in reality. There are ways around the issue using overlapping windows, but that requires a fair amount of extra samples before you can start getting output from the input. FFTs also have length restrictions, you need specific numbers of samples to calculate an FFT with, which may not align with the number of samples you need to output at a given time, requiring more buffering. The size of the FFT will also influence how precise your frequency measurements are, with fewer samples resulting in wider frequency bands (so the lowest frequency band may cover both inaudible and audible low frequencies; basically sample_rate / sample_count will give the range in hz covered by each frequency band in the FFT).

There's also no telling what low-frequency sounds may end up in the audio mix. Even if you carefully author and use specific sounds that you know don't have inaudibly low frequencies where they're not supposed to, various processes like resampling, pitch shifting, and even gain ramping can introduce noise, potentially resulting in ultra low frequencies being detected where they're not supposed to be.

from openal-soft.

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.