From 814b3dbfbc095fcedab3737c45f93283f84cb1ea Mon Sep 17 00:00:00 2001 From: Marc Guay Date: Fri, 22 May 2009 13:51:56 +0000 Subject: FS#10230 - Remove 'start new file if not recording' functionality from ACTION_REC_NEWFILE git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21034 a1c6a512-1295-4272-9138-f99709370657 --- apps/recorder/recording.c | 40 +++++++++++++++++++++------------------- 1 file changed, 21 insertions(+), 19 deletions(-) diff --git a/apps/recorder/recording.c b/apps/recorder/recording.c index 5b5dc55b40..f627399738 100644 --- a/apps/recorder/recording.c +++ b/apps/recorder/recording.c @@ -1518,8 +1518,18 @@ bool recording_screen(bool no_source) update_countdown = 0; /* Update immediately */ break; #endif - case ACTION_REC_PAUSE: case ACTION_REC_NEWFILE: + + /* Only act if in the middle of recording. */ + if(audio_stat & AUDIO_STATUS_RECORD) + { + rec_command(RECORDING_CMD_START_NEWFILE); + last_seconds = 0; + } + break; + + case ACTION_REC_PAUSE: + /* Only act if the mpeg is stopped */ if(!(audio_stat & AUDIO_STATUS_RECORD)) { @@ -1547,30 +1557,22 @@ bool recording_screen(bool no_source) peak_meter_set_trigger_listener(&trigger_listener); } } + /* If we're in the middle of recording */ else { - /*if new file button pressed, start new file */ - if (button == ACTION_REC_NEWFILE) + /* if pause button pressed, pause or resume */ + if(audio_stat & AUDIO_STATUS_PAUSE) { - rec_command(RECORDING_CMD_START_NEWFILE); - last_seconds = 0; + rec_command(RECORDING_CMD_RESUME); + if (global_settings.talk_menu) + { + /* no voice possible here, but a beep */ + audio_beep(HZ/4); /* short beep on resume */ + } } else - /* if pause button pressed, pause or resume */ { - if(audio_stat & AUDIO_STATUS_PAUSE) - { - rec_command(RECORDING_CMD_RESUME); - if (global_settings.talk_menu) - { - /* no voice possible here, but a beep */ - audio_beep(HZ/4); /* short beep on resume */ - } - } - else - { - rec_command(RECORDING_CMD_PAUSE); - } + rec_command(RECORDING_CMD_PAUSE); } } update_countdown = 0; /* Update immediately */ -- cgit v1.2.3