mirror of
https://github.com/hyperion-project/hyperion.ng.git
synced 2025-03-01 10:33:28 +00:00
Renamed uvMeter to VU Meter (Volume Unit)
- Fixed issues flagged by code scanning bot.
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user