diff options
-rw-r--r-- | apps/recorder/recording.c | 12 | ||||
-rw-r--r-- | firmware/pcm_record.c | 4 |
2 files changed, 10 insertions, 6 deletions
diff --git a/apps/recorder/recording.c b/apps/recorder/recording.c index 172689372f..0d414292b2 100644 --- a/apps/recorder/recording.c +++ b/apps/recorder/recording.c | |||
@@ -320,11 +320,11 @@ static void trigger_listener(int trigger_status) | |||
320 | case TRIG_GO: | 320 | case TRIG_GO: |
321 | if((audio_status() & AUDIO_STATUS_RECORD) != AUDIO_STATUS_RECORD) | 321 | if((audio_status() & AUDIO_STATUS_RECORD) != AUDIO_STATUS_RECORD) |
322 | { | 322 | { |
323 | talk_buffer_steal(); /* we use the mp3 buffer */ | 323 | talk_buffer_steal(); /* we use the mp3 buffer */ |
324 | audio_record(rec_create_filename(path_buffer)); | 324 | audio_record(rec_create_filename(path_buffer)); |
325 | 325 | ||
326 | /* give control to mpeg thread so that it can start recording */ | 326 | /* give control to mpeg thread so that it can start recording*/ |
327 | yield(); yield(); yield(); | 327 | yield(); yield(); yield(); |
328 | } | 328 | } |
329 | 329 | ||
330 | /* if we're already recording this is a retrigger */ | 330 | /* if we're already recording this is a retrigger */ |
@@ -567,7 +567,9 @@ bool recording_screen(void) | |||
567 | #endif | 567 | #endif |
568 | peak_meter_enabled = true; | 568 | peak_meter_enabled = true; |
569 | 569 | ||
570 | #if CONFIG_CODEC != SWCODEC | ||
570 | if (global_settings.rec_prerecord_time) | 571 | if (global_settings.rec_prerecord_time) |
572 | #endif | ||
571 | talk_buffer_steal(); /* will use the mp3 buffer */ | 573 | talk_buffer_steal(); /* will use the mp3 buffer */ |
572 | 574 | ||
573 | audio_set_recording_options(global_settings.rec_frequency, | 575 | audio_set_recording_options(global_settings.rec_frequency, |
@@ -905,7 +907,9 @@ bool recording_screen(void) | |||
905 | } | 907 | } |
906 | settings_save(); | 908 | settings_save(); |
907 | 909 | ||
910 | #if CONFIG_CODEC != SWCODEC | ||
908 | if (global_settings.rec_prerecord_time) | 911 | if (global_settings.rec_prerecord_time) |
912 | #endif | ||
909 | talk_buffer_steal(); /* will use the mp3 buffer */ | 913 | talk_buffer_steal(); /* will use the mp3 buffer */ |
910 | 914 | ||
911 | audio_set_recording_options(global_settings.rec_frequency, | 915 | audio_set_recording_options(global_settings.rec_frequency, |
diff --git a/firmware/pcm_record.c b/firmware/pcm_record.c index 8805e73157..8d34b345c8 100644 --- a/firmware/pcm_record.c +++ b/firmware/pcm_record.c | |||
@@ -820,8 +820,8 @@ static void pcmrec_init(void) | |||
820 | is_paused = false; | 820 | is_paused = false; |
821 | is_error = false; | 821 | is_error = false; |
822 | 822 | ||
823 | rec_buffer = (unsigned char*)(((unsigned long)audiobuf) & ~3); | 823 | rec_buffer = (unsigned char*)(((unsigned long)audiobuf + talk_get_bufsize()) & ~3); |
824 | buffer_size = (long)audiobufend - (long)audiobuf - 16; | 824 | buffer_size = (long)audiobufend - (long)audiobuf - talk_get_bufsize() - 16; |
825 | 825 | ||
826 | logf("buf size: %d kb", buffer_size/1024); | 826 | logf("buf size: %d kb", buffer_size/1024); |
827 | 827 | ||