johnliu55tw / alsasoundmeter Goto Github PK
View Code? Open in Web Editor NEWSimple Linux sound meter based on ALSA API
License: MIT License
Simple Linux sound meter based on ALSA API
License: MIT License
But it compiles just nice with clang version 3.8.0-2ubuntu4, and the executable works smoothly.
The errors that I get if I run make (with gcc) are:
/tmp/ccqMjrgS.o: In function rms': sound_meter.c:(.text+0x7b): undefined reference to
sqrt'
/tmp/ccqMjrgS.o: In function main': sound_meter.c:(.text+0x122): undefined reference to
snd_pcm_open'
sound_meter.c:(.text+0x135): undefined reference to snd_strerror' sound_meter.c:(.text+0x181): undefined reference to
snd_pcm_set_params'
sound_meter.c:(.text+0x198): undefined reference to snd_strerror' sound_meter.c:(.text+0x1f2): undefined reference to
snd_pcm_readi'
sound_meter.c:(.text+0x216): undefined reference to snd_pcm_recover' sound_meter.c:(.text+0x22d): undefined reference to
snd_strerror'
sound_meter.c:(.text+0x298): undefined reference to `log10'
collect2: error: ld returned 1 exit status
Makefile:2: recipe for target 'sound_meter' failed
make: *** [sound_meter] Error 1
Hello Johnliu.
I'm not a C coder, but i tryed to transform your code in a stereo meter to get the dsnoop virtual sound card to monitor recorded/streamed (stereo) signal.
the attached code is a mare duplication of your, but obviusly is segmentating (no compilation error altough). I suppose a stereo signal has a returning sample of twice the data and have to be slitted in lower (L) and upper(sample data), but do not know how to do that.
Attached my modded code, could you help me making your smart code a more flexible vumeter application?
Thanks,
Federico
$ make
gcc sound_meter.c -o sound_meter -lm -lasound
sound_meter.c:25:9: fatal error: alsa/asoundlib.h: No such file or directory
25 | #include<alsa/asoundlib.h>
| ^~~~~~~~~~~~~~~~~~
compilation terminated.
Add device selector option.
Like speaker-test -D.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.