diff options
author | Björn Stenberg <bjorn@haxx.se> | 2002-10-18 12:05:15 +0000 |
---|---|---|
committer | Björn Stenberg <bjorn@haxx.se> | 2002-10-18 12:05:15 +0000 |
commit | 0834d3f322abf9fc9058be1135e78a061ec46bd4 (patch) | |
tree | e62bdc6f6dd7a4c65263412a816231c7214dcbe8 /firmware | |
parent | 8ca78b666522ca3a4f13d6baf26da112a77c7220 (diff) | |
download | rockbox-0834d3f322abf9fc9058be1135e78a061ec46bd4.tar.gz rockbox-0834d3f322abf9fc9058be1135e78a061ec46bd4.zip |
Pitch steps changed to 0.1% instead of 1%.
Holding down ON+RIGHT/LEFT increases/decreses pitch 2% while key is held down, then returns.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@2718 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware')
-rw-r--r-- | firmware/mpeg.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/firmware/mpeg.c b/firmware/mpeg.c index 85054d7cf0..d75ac2085e 100644 --- a/firmware/mpeg.c +++ b/firmware/mpeg.c | |||
@@ -1985,16 +1985,19 @@ void mpeg_sound_channel_config(int configuration) | |||
1985 | #ifdef HAVE_MAS3587F | 1985 | #ifdef HAVE_MAS3587F |
1986 | /* This function works by telling the decoder that we have another | 1986 | /* This function works by telling the decoder that we have another |
1987 | crystal frequency than we actually have. It will adjust its internal | 1987 | crystal frequency than we actually have. It will adjust its internal |
1988 | parameters and the result is that the audio is played at another pitch */ | 1988 | parameters and the result is that the audio is played at another pitch. |
1989 | void mpeg_set_pitch(int percent) | 1989 | |
1990 | The pitch value is in tenths of percent. | ||
1991 | */ | ||
1992 | void mpeg_set_pitch(int pitch) | ||
1990 | { | 1993 | { |
1991 | unsigned long val; | 1994 | unsigned long val; |
1992 | 1995 | ||
1993 | /* invert percent value */ | 1996 | /* invert pitch value */ |
1994 | percent = 10000/percent; | 1997 | pitch = 1000000/pitch; |
1995 | 1998 | ||
1996 | /* Calculate the new (bogus) frequency */ | 1999 | /* Calculate the new (bogus) frequency */ |
1997 | val = 18432*percent/100; | 2000 | val = 18432*pitch/1000; |
1998 | 2001 | ||
1999 | mas_writemem(MAS_BANK_D0,0x7f3,&val,1); | 2002 | mas_writemem(MAS_BANK_D0,0x7f3,&val,1); |
2000 | 2003 | ||