From 478da628f0eb5fb3b5163dab459927ada52badfc Mon Sep 17 00:00:00 2001 From: Linus Nielsen Feltzing Date: Sun, 20 Apr 2003 22:00:30 +0000 Subject: Xing headers now support mono better, added the 'editable files' option git-svn-id: svn://svn.rockbox.org/rockbox/trunk@3572 a1c6a512-1295-4272-9138-f99709370657 --- apps/lang/english.lang | 5 ++ apps/onplay.c | 6 +-- apps/recorder/recording.c | 30 +++++++---- apps/settings.c | 26 +++++++-- apps/settings.h | 1 + apps/sound_menu.c | 7 +++ firmware/export/mp3data.h | 2 +- firmware/export/mpeg.h | 6 ++- firmware/mp3data.c | 133 +++++++++++++++++++++++++--------------------- firmware/mpeg.c | 26 ++++++--- 10 files changed, 152 insertions(+), 90 deletions(-) diff --git a/apps/lang/english.lang b/apps/lang/english.lang index e080491e2c..15d9039018 100644 --- a/apps/lang/english.lang +++ b/apps/lang/english.lang @@ -1467,3 +1467,8 @@ id: LANG_INVERT_CURSOR desc: in settings_menu eng: "Invert cursor" new: + +id: LANG_RECORDING_EDITABLE +desc: Editable recordings setting +eng: "Editable files" +new: diff --git a/apps/onplay.c b/apps/onplay.c index 3ba4c1b49c..14e3cdd7a7 100644 --- a/apps/onplay.c +++ b/apps/onplay.c @@ -251,11 +251,11 @@ static bool vbr_fix(void) flen, xingupdate); if(num_frames) { - /* Note: We don't need to pass any values for mpeg_version and - sample_rate because they will be extracted from the mpeg stream */ + /* Note: We don't need to pass a template header because it will be + taken from the mpeg stream */ framelen = create_xing_header(fd, entry.first_frame_offset, flen, xingbuf, num_frames, - 0, 0, xingupdate, true); + 0, xingupdate, true); /* Try to fit the Xing header first in the stream. Replace the existing VBR header if there is one, else see if there is room between the diff --git a/apps/recorder/recording.c b/apps/recorder/recording.c index cf295db19c..14bd37d950 100644 --- a/apps/recorder/recording.c +++ b/apps/recorder/recording.c @@ -169,7 +169,8 @@ bool recording_screen(void) mpeg_set_recording_options(global_settings.rec_frequency, global_settings.rec_quality, global_settings.rec_source, - global_settings.rec_channels); + global_settings.rec_channels, + global_settings.rec_editable); set_gain(); @@ -312,22 +313,29 @@ bool recording_screen(void) mpeg_set_recording_options(global_settings.rec_frequency, global_settings.rec_quality, global_settings.rec_source, - global_settings.rec_channels); + global_settings.rec_channels, + global_settings.rec_editable); set_gain(); update_countdown = 1; /* Update immediately */ break; case BUTTON_F2: - if (f2_rec_screen()) - return SYS_USB_CONNECTED; - update_countdown = 1; /* Update immediately */ + if(mpeg_status()) + { + if (f2_rec_screen()) + return SYS_USB_CONNECTED; + update_countdown = 1; /* Update immediately */ + } break; case BUTTON_F3: - if (f3_rec_screen()) - return SYS_USB_CONNECTED; - update_countdown = 1; /* Update immediately */ + if(mpeg_status()) + { + if (f3_rec_screen()) + return SYS_USB_CONNECTED; + update_countdown = 1; /* Update immediately */ + } break; } @@ -537,7 +545,8 @@ bool f2_rec_screen(void) mpeg_set_recording_options(global_settings.rec_frequency, global_settings.rec_quality, global_settings.rec_source, - global_settings.rec_channels); + global_settings.rec_channels, + global_settings.rec_editable); set_gain(); @@ -621,7 +630,8 @@ bool f3_rec_screen(void) mpeg_set_recording_options(global_settings.rec_frequency, global_settings.rec_quality, global_settings.rec_source, - global_settings.rec_channels); + global_settings.rec_channels, + global_settings.rec_editable); set_gain(); diff --git a/apps/settings.c b/apps/settings.c index 8c132c5f9b..8b74df852b 100644 --- a/apps/settings.c +++ b/apps/settings.c @@ -96,8 +96,8 @@ offset abs 0x16 0x2a <(int) Byte offset into resume file> 0x1a 0x2e