diff options
Diffstat (limited to 'apps/recorder/peakmeter.c')
-rw-r--r-- | apps/recorder/peakmeter.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/apps/recorder/peakmeter.c b/apps/recorder/peakmeter.c index 9f0db3330a..48a695b933 100644 --- a/apps/recorder/peakmeter.c +++ b/apps/recorder/peakmeter.c | |||
@@ -619,8 +619,13 @@ void peak_meter_peek(void) | |||
619 | /* read current values */ | 619 | /* read current values */ |
620 | #if CONFIG_CODEC == SWCODEC | 620 | #if CONFIG_CODEC == SWCODEC |
621 | if (pm_playback) | 621 | if (pm_playback) |
622 | { | ||
623 | static struct pcm_peaks chan_peaks; /* *MUST* be static */ | ||
622 | mixer_channel_calculate_peaks(PCM_MIXER_CHAN_PLAYBACK, | 624 | mixer_channel_calculate_peaks(PCM_MIXER_CHAN_PLAYBACK, |
623 | &pm_cur_left, &pm_cur_right); | 625 | &chan_peaks); |
626 | pm_cur_left = chan_peaks.left; | ||
627 | pm_cur_right = chan_peaks.right; | ||
628 | } | ||
624 | #ifdef HAVE_RECORDING | 629 | #ifdef HAVE_RECORDING |
625 | else | 630 | else |
626 | pcm_calculate_rec_peaks(&pm_cur_left, &pm_cur_right); | 631 | pcm_calculate_rec_peaks(&pm_cur_left, &pm_cur_right); |