summaryrefslogtreecommitdiff
path: root/apps/gui/pitchscreen.c
diff options
context:
space:
mode:
Diffstat (limited to 'apps/gui/pitchscreen.c')
-rw-r--r--apps/gui/pitchscreen.c15
1 files changed, 7 insertions, 8 deletions
diff --git a/apps/gui/pitchscreen.c b/apps/gui/pitchscreen.c
index 77b5739be1..a0058724ec 100644
--- a/apps/gui/pitchscreen.c
+++ b/apps/gui/pitchscreen.c
@@ -23,9 +23,8 @@
23#include <string.h> 23#include <string.h>
24#include <stdio.h> 24#include <stdio.h>
25#include <math.h> 25#include <math.h>
26#include <stdlib.h> /* for ABS() */ 26#include <stdlib.h> /* for abs() */
27#include "config.h" 27#include "config.h"
28#include "sprintf.h"
29#include "action.h" 28#include "action.h"
30#include "dsp.h" 29#include "dsp.h"
31#include "sound.h" 30#include "sound.h"
@@ -248,10 +247,10 @@ static void pitchscreen_draw(struct screen *display, int max_lines,
248 /* Pitch:XXX.X% */ 247 /* Pitch:XXX.X% */
249 if(global_settings.pitch_mode_semitone) 248 if(global_settings.pitch_mode_semitone)
250 { 249 {
251 snprintf(buf, sizeof(buf), "%s: %s%ld.%02ld", str(LANG_PITCH), 250 snprintf(buf, sizeof(buf), "%s: %s%d.%02d", str(LANG_PITCH),
252 semitone >= 0 ? "+" : "-", 251 semitone >= 0 ? "+" : "-",
253 ABS(semitone / PITCH_SPEED_PRECISION), 252 abs(semitone / PITCH_SPEED_PRECISION),
254 ABS((semitone % PITCH_SPEED_PRECISION) / 253 abs((semitone % PITCH_SPEED_PRECISION) /
255 (PITCH_SPEED_PRECISION / 100)) 254 (PITCH_SPEED_PRECISION / 100))
256 ); 255 );
257 } 256 }
@@ -290,10 +289,10 @@ static void pitchscreen_draw(struct screen *display, int max_lines,
290 { 289 {
291 if(global_settings.pitch_mode_semitone) 290 if(global_settings.pitch_mode_semitone)
292 { 291 {
293 snprintf(buf, sizeof(buf), "%s%ld.%02ld", 292 snprintf(buf, sizeof(buf), "%s%d.%02d",
294 semitone >= 0 ? "+" : "-", 293 semitone >= 0 ? "+" : "-",
295 ABS(semitone / PITCH_SPEED_PRECISION), 294 abs(semitone / PITCH_SPEED_PRECISION),
296 ABS((semitone % PITCH_SPEED_PRECISION) / 295 abs((semitone % PITCH_SPEED_PRECISION) /
297 (PITCH_SPEED_PRECISION / 100)) 296 (PITCH_SPEED_PRECISION / 100))
298 ); 297 );
299 } 298 }