Comments (6)
It is all explained in the documentation in the README file
from native-sound-mixer.
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.
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.
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.
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.
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)
- 32-bit compatibility HOT 1
- Per app audio panning function HOT 7
- Subscribe to Volume / Mute Changes HOT 25
- Native Crash HOT 17
- Compatible with Electron 21+ / V8's Memory Cage? HOT 2
- Feat: `pkg-prebuilds` HOT 8
- fix linux implementation on develop
- add basic CI/CD for push event
- Enhance documentation
- Publish packages automatically when tag is added and merged to master.
- Cannot find module .../native-sound-mixer\dist/addons/win-sound-mixer.node HOT 3
- EXCEPTION_ACCESS_VIOLATION_READ: Attempted to dereference null pointer HOT 2
- Cannot install package from npm HOT 11
- Storing PID in AudioSession object? HOT 1
- Building for nwjs HOT 1
- Changing volume only works if the audio session is active HOT 4
- Memory usage issue HOT 3
- macOS support HOT 1
- Zoom audio session not captured correctly HOT 16
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from native-sound-mixer.