forked from len0rd/rockbox
Fix %Sp expansion in wps
The value returned from sound_get_pitch() was shown assuming that 100% corresponds to 1000 by skin_tokens.c::get_token_value(). The value actually is 100*PITCH_SPEED_PRECISION. Steal the way the callchain from gui_syncpitchscreen_run() to pitchscreen_draw() in apps/gui/pitchscreen.c formats the value and use it here for consistency. Flyspray: FS#10673 Author: Junio C Hamano git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23199 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
44cacbe595
commit
0070f60441
2 changed files with 5 additions and 3 deletions
|
@ -717,9 +717,10 @@ const char *get_token_value(struct gui_wps *gwps,
|
|||
#if (CONFIG_CODEC != MAS3507D)
|
||||
case WPS_TOKEN_SOUND_PITCH:
|
||||
{
|
||||
int val = sound_get_pitch();
|
||||
snprintf(buf, buf_size, "%d.%d",
|
||||
val / 10, val % 10);
|
||||
int32_t pitch = sound_get_pitch();
|
||||
snprintf(buf, buf_size, "%ld.%ld",
|
||||
pitch / PITCH_SPEED_PRECISION,
|
||||
(pitch % PITCH_SPEED_PRECISION) / (PITCH_SPEED_PRECISION / 10));
|
||||
return buf;
|
||||
}
|
||||
#endif
|
||||
|
|
|
@ -498,6 +498,7 @@ Carsten Schreiter
|
|||
Michael Sparmann
|
||||
Seth Opgenorth
|
||||
Jonas Aaberg
|
||||
Junio C Hamano
|
||||
|
||||
The libmad team
|
||||
The wavpack team
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue