diff options
Diffstat (limited to 'apps/recorder/recording.c')
-rw-r--r-- | apps/recorder/recording.c | 43 |
1 files changed, 22 insertions, 21 deletions
diff --git a/apps/recorder/recording.c b/apps/recorder/recording.c index 37244a65c6..7e24ab9a30 100644 --- a/apps/recorder/recording.c +++ b/apps/recorder/recording.c | |||
@@ -1510,14 +1510,10 @@ bool recording_screen(bool no_source) | |||
1510 | update_countdown = 0; /* Update immediately */ | 1510 | update_countdown = 0; /* Update immediately */ |
1511 | break; | 1511 | break; |
1512 | #endif | 1512 | #endif |
1513 | case ACTION_REC_PAUSE: | ||
1513 | case ACTION_REC_NEWFILE: | 1514 | case ACTION_REC_NEWFILE: |
1514 | /* start recording or start a new file */ | 1515 | /* Only act if the mpeg is stopped */ |
1515 | if(audio_stat & AUDIO_STATUS_RECORD) | 1516 | if(!(audio_stat & AUDIO_STATUS_RECORD)) |
1516 | { | ||
1517 | rec_command(RECORDING_CMD_START_NEWFILE); | ||
1518 | last_seconds = 0; | ||
1519 | } | ||
1520 | else | ||
1521 | { | 1517 | { |
1522 | /* is this manual or triggered recording? */ | 1518 | /* is this manual or triggered recording? */ |
1523 | if ((global_settings.rec_trigger_mode == TRIG_MODE_OFF) || | 1519 | if ((global_settings.rec_trigger_mode == TRIG_MODE_OFF) || |
@@ -1543,25 +1539,30 @@ bool recording_screen(bool no_source) | |||
1543 | peak_meter_set_trigger_listener(&trigger_listener); | 1539 | peak_meter_set_trigger_listener(&trigger_listener); |
1544 | } | 1540 | } |
1545 | } | 1541 | } |
1546 | update_countdown = 0; /* Update immediately */ | 1542 | else |
1547 | break; | ||
1548 | case ACTION_REC_PAUSE: | ||
1549 | /* Only act if a recording is ongoing (paused or not) */ | ||
1550 | if(audio_stat & AUDIO_STATUS_RECORD) | ||
1551 | { | 1543 | { |
1552 | /* if pause button pressed, pause or resume */ | 1544 | /*if new file button pressed, start new file */ |
1553 | if(audio_stat & AUDIO_STATUS_PAUSE) | 1545 | if (button == ACTION_REC_NEWFILE) |
1554 | { | 1546 | { |
1555 | rec_command(RECORDING_CMD_RESUME); | 1547 | rec_command(RECORDING_CMD_START_NEWFILE); |
1556 | if (global_settings.talk_menu) | 1548 | last_seconds = 0; |
1557 | { | ||
1558 | /* no voice possible here, but a beep */ | ||
1559 | audio_beep(HZ/4); /* short beep on resume */ | ||
1560 | } | ||
1561 | } | 1549 | } |
1562 | else | 1550 | else |
1551 | /* if pause button pressed, pause or resume */ | ||
1563 | { | 1552 | { |
1564 | rec_command(RECORDING_CMD_PAUSE); | 1553 | if(audio_stat & AUDIO_STATUS_PAUSE) |
1554 | { | ||
1555 | rec_command(RECORDING_CMD_RESUME); | ||
1556 | if (global_settings.talk_menu) | ||
1557 | { | ||
1558 | /* no voice possible here, but a beep */ | ||
1559 | audio_beep(HZ/4); /* short beep on resume */ | ||
1560 | } | ||
1561 | } | ||
1562 | else | ||
1563 | { | ||
1564 | rec_command(RECORDING_CMD_PAUSE); | ||
1565 | } | ||
1565 | } | 1566 | } |
1566 | } | 1567 | } |
1567 | update_countdown = 0; /* Update immediately */ | 1568 | update_countdown = 0; /* Update immediately */ |