Commit e5685e48 authored by Simon Morlat's avatar Simon Morlat
Browse files

fix typo and overflow in energy computation

parent 7960b371
......@@ -264,7 +264,7 @@ static snd_pcm_t * alsa_open_w(const char *pcmdev,int bits,int stereo,int rate)
{
snd_pcm_t *pcm_handle;
ms_message("alsa_open_r: opening %s at %iHz, bits=%i, stereo=%i",pcmdev,rate,bits,stereo);
ms_message("alsa_open_w: opening %s at %iHz, bits=%i, stereo=%i",pcmdev,rate,bits,stereo);
if (snd_pcm_open(&pcm_handle, pcmdev,SND_PCM_STREAM_PLAYBACK,SND_PCM_NONBLOCK) < 0) {
ms_warning("alsa_open_w: Error opening PCM device %s",pcmdev );
......
......@@ -335,7 +335,7 @@ static inline int16_t saturate(int val) {
// with filtered peak detection, variable buffer size from volume_process call is not optimal
static void update_energy(int16_t *signal, int numsamples, Volume *v) {
int i;
int acc = 0;
float acc = 0;
float en;
#if 0
int lp = 0, pk = 0;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment