1
0
Fork 0
forked from len0rd/rockbox

Use playback channel directly for peakmeters and plugins using peak calculation. Also, for now, don't allow mixer playback to overlap recording, even if full duplex works.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30119 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Michael Sevakis 2011-07-02 11:55:38 +00:00
parent 8c954e28b7
commit 22b6def065
10 changed files with 81 additions and 32 deletions

View file

@ -422,7 +422,8 @@ int plugin_main(void)
/* Get the peaks. ( Borrowed from vu_meter ) */
#if (CONFIG_CODEC == SWCODEC)
int left_peak, right_peak;
rb->pcm_calculate_peaks(&left_peak, &right_peak);
rb->mixer_channel_calculate_peaks(PCM_MIXER_CHAN_PLAYBACK,
&left_peak, &right_peak);
#else
int left_peak = rb->mas_codec_readreg(0xC);
int right_peak = rb->mas_codec_readreg(0xD);