Giter VIP home page Giter VIP logo

Comments (6)

m1dugh avatar m1dugh commented on July 28, 2024

It is all explained in the documentation in the README file

from native-sound-mixer.

fu-raz avatar fu-raz commented on July 28, 2024

I meant like a VU meter not so much the audio level. The green bars in the screenshot. Sorry I wasn't clearer

from native-sound-mixer.

m1dugh avatar m1dugh commented on July 28, 2024

It is a node js API, therefore there is no like display or whatever, you can read the levels but you cannot display it with the API.

from native-sound-mixer.

fu-raz avatar fu-raz commented on July 28, 2024

I get that it's an API. I'm working on a plugin for MIDI mixer. It uses NodeJS as the programming language for the plugin. Unfortunately it doesn't expose the VU. So I was hoping to use your API to read the VU levels.
From what I saw in the read me I can read and set the volume. So like: set the volume of this audio device to 100% or 50%. But that's not really what I need.

I'm looking for the dB or VU or loudness of audio playing. Maybe I'm using the wrong names, sorry about that. English isn't my first language and I'm also an audio noob.

What I'm looking for is something like:

setInterval( () => { console.log(device.getCurrentAudioLevel()) }, 1000)

This would give me a different value every second depending on the audio that is playing on the device. Like for example 0 if there's no audio playing and 1 if it is really loud. Does that make sense?

From what I see if I use the API as it is now and I would use
let device = SoundMixer.getDefaultDevice(DeviceType.RENDER); setInterval( () => { console.log(device.volume) }, 1000);
This would give me the same value everytime right?

from native-sound-mixer.

m1dugh avatar m1dugh commented on July 28, 2024

You are absolutely right. Right now there is no way to know this. However, the functionalities you are looking for are available in the Windows core audio API. You can make a PR to provide this enhancement if you want.

from native-sound-mixer.

fu-raz avatar fu-raz commented on July 28, 2024

Thanks for pointing me in the right direction! I'll see if I'm able to get this working

from native-sound-mixer.

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.