summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUlrich Hecht <uli@fpond.eu>2021-08-16 11:58:13 +0200
committerSolomon Peachy <pizza@shaftnet.org>2021-08-19 18:09:48 +0000
commitc302c157d5dd1c32ff47e1ba774c310a3f1f7dc4 (patch)
tree118f3e33e613178ee0a9ae36f872483fa4520b7f
parent0679faf65deabafc0ebd0f01f5f90c3f4bc9d065 (diff)
downloadrockbox-c302c157d5dd1c32ff47e1ba774c310a3f1f7dc4.tar.gz
rockbox-c302c157d5dd1c32ff47e1ba774c310a3f1f7dc4.zip
peakmeter: re-enable on hosted platforms
Has been disabled since HW codec support was dropped, but works fine. Tested on Surfans F20. Change-Id: I97f06a009048e8135ca21118467c491e7077fa4f
-rw-r--r--apps/recorder/peakmeter.c13
1 files changed, 0 insertions, 13 deletions
diff --git a/apps/recorder/peakmeter.c b/apps/recorder/peakmeter.c
index e8e5db551a..900bb6d7c3 100644
--- a/apps/recorder/peakmeter.c
+++ b/apps/recorder/peakmeter.c
@@ -46,9 +46,7 @@
46#include "pcm_record.h" 46#include "pcm_record.h"
47#endif 47#endif
48 48
49#if !(CONFIG_PLATFORM & PLATFORM_HOSTED)
50static bool pm_playback = true; /* selects between playback and recording peaks */ 49static bool pm_playback = true; /* selects between playback and recording peaks */
51#endif
52 50
53static struct meter_scales scales[NB_SCREENS]; 51static struct meter_scales scales[NB_SCREENS];
54 52
@@ -543,11 +541,7 @@ void pm_reset_clipcount(void)
543 */ 541 */
544void peak_meter_playback(bool playback) 542void peak_meter_playback(bool playback)
545{ 543{
546#if (CONFIG_PLATFORM & PLATFORM_HOSTED)
547 (void)playback;
548#else
549 pm_playback = playback; 544 pm_playback = playback;
550#endif
551 /* reset the scales just in case recording and playback 545 /* reset the scales just in case recording and playback
552 use different viewport sizes. Normally we should be checking viewport 546 use different viewport sizes. Normally we should be checking viewport
553 sizes every time but this will do for now */ 547 sizes every time but this will do for now */
@@ -582,10 +576,6 @@ void peak_meter_peek(void)
582 bool was_clipping = pm_clip_left || pm_clip_right; 576 bool was_clipping = pm_clip_left || pm_clip_right;
583#endif 577#endif
584 /* read current values */ 578 /* read current values */
585#if (CONFIG_PLATFORM & PLATFORM_HOSTED)
586 pm_cur_left = left = 8000;
587 pm_cur_right = right = 9000;
588#else
589 if (pm_playback) 579 if (pm_playback)
590 { 580 {
591 static struct pcm_peaks chan_peaks; /* *MUST* be static */ 581 static struct pcm_peaks chan_peaks; /* *MUST* be static */
@@ -600,7 +590,6 @@ void peak_meter_peek(void)
600#endif 590#endif
601 left = pm_cur_left; 591 left = pm_cur_left;
602 right = pm_cur_right; 592 right = pm_cur_right;
603#endif
604 593
605 /* check for clips 594 /* check for clips
606 An clip is assumed when two consecutive readouts 595 An clip is assumed when two consecutive readouts
@@ -1078,9 +1067,7 @@ static void peak_meter_draw(struct screen *display, struct meter_scales *scales,
1078 /* cliplight */ 1067 /* cliplight */
1079 if ((pm_clip_left || pm_clip_right) && 1068 if ((pm_clip_left || pm_clip_right) &&
1080 global_settings.cliplight 1069 global_settings.cliplight
1081#if !(CONFIG_PLATFORM & PLATFORM_HOSTED)
1082 && !pm_playback 1070 && !pm_playback
1083#endif
1084 ) 1071 )
1085 { 1072 {
1086 /* if clipping, cliplight setting on and in recording screen */ 1073 /* if clipping, cliplight setting on and in recording screen */