Renamed uvMeter to VU Meter (Volume Unit)

- Fixed issues flagged by code scanning bot.
This commit is contained in:
Michael Rochelle
2023-02-18 12:40:13 -08:00
parent bd0a0df900
commit 7edfe54ed7
8 changed files with 225 additions and 178 deletions

View File

@@ -89,9 +89,7 @@ void AudioGrabber::processAudioFrame(int16_t* buffer, int length)
// TODO: Support Stereo capture with different meters per side
// Default UVMeter - Later Make this pluggable for different audio effects
// FIXME: We might already reflect different ways of audio image representation in the grabber JSON. I will provide a sample how it might look like...
// Default VUMeter - Later Make this pluggable for different audio effects
double averageAmplitude = 0;
// Calculate the the average amplitude value in the buffer

View File

@@ -205,14 +205,7 @@ bool AudioGrabberLinux::start()
stop();
return false;
}
/*
if (pthread_attr_setschedparam(&threadAttributes, &schedulerParameter) != 0)
{
Debug(_log, "Failed to set scheduler parameters");
stopAudio();
return false;
}
*/
if (pthread_create(&_audioThread, &threadAttributes, static_cast<THREADFUNCPTR>(&AudioThreadRunner), static_cast<void*>(this)) != 0)
{
Debug(_log, "Failed to create audio capture thread");
@@ -250,7 +243,7 @@ void AudioGrabberLinux::processAudioBuffer(snd_pcm_sframes_t frames)
ssize_t bytes = snd_pcm_frames_to_bytes(_captureDevice, frames);
int16_t * buffer = static_cast<int16_t*>(calloc(static_cast<size_t>(bytes / 2), sizeof(int16_t))); // * snd_pcm_format_width(SND_PCM_FORMAT_S16_LE) / 8 * 2);
int16_t * buffer = static_cast<int16_t*>(calloc(static_cast<size_t>(bytes / 2), sizeof(int16_t)));
if (frames == 0)
{