diff options
author | Michael Sevakis <jethead71@rockbox.org> | 2013-06-22 16:39:40 -0400 |
---|---|---|
committer | Michael Sevakis <jethead71@rockbox.org> | 2013-06-30 00:40:09 +0200 |
commit | a9ea1a42695401334717f2e497a7f5576d87691d (patch) | |
tree | 806f457038f7d2edf17335355169116947ecb2c3 /apps | |
parent | bc3a0795225553ccd7465ce977a8f0dc435b166a (diff) | |
download | rockbox-a9ea1a42695401334717f2e497a7f5576d87691d.tar.gz rockbox-a9ea1a42695401334717f2e497a7f5576d87691d.zip |
Fix some whitespace in files changed in following commit.
Change-Id: Ie3f43e43076e0dcae9a10f1b0b9e4698b398acee
Reviewed-on: http://gerrit.rockbox.org/492
Reviewed-by: Michael Sevakis <jethead71@rockbox.org>
Tested-by: Michael Sevakis <jethead71@rockbox.org>
Diffstat (limited to 'apps')
-rw-r--r-- | apps/playback.c | 2 | ||||
-rw-r--r-- | apps/recorder/pcm_record.c | 44 | ||||
-rw-r--r-- | apps/recorder/recording.c | 14 |
3 files changed, 30 insertions, 30 deletions
diff --git a/apps/playback.c b/apps/playback.c index 5e3e4d008d..f676c6d31f 100644 --- a/apps/playback.c +++ b/apps/playback.c | |||
@@ -787,7 +787,7 @@ static void audio_reset_buffer_noalloc( | |||
787 | allocsize = ALIGN_UP(allocsize, sizeof (intptr_t)); | 787 | allocsize = ALIGN_UP(allocsize, sizeof (intptr_t)); |
788 | if (allocsize > filebuflen) | 788 | if (allocsize > filebuflen) |
789 | goto bufpanic; | 789 | goto bufpanic; |
790 | 790 | ||
791 | filebuflen -= allocsize; | 791 | filebuflen -= allocsize; |
792 | 792 | ||
793 | /* Scratch memory */ | 793 | /* Scratch memory */ |
diff --git a/apps/recorder/pcm_record.c b/apps/recorder/pcm_record.c index 3b3211afab..6b9adda8bd 100644 --- a/apps/recorder/pcm_record.c +++ b/apps/recorder/pcm_record.c | |||
@@ -99,7 +99,7 @@ static int num_channels; /* Current number of channels */ | |||
99 | static int rec_mono_mode; /* how mono is created */ | 99 | static int rec_mono_mode; /* how mono is created */ |
100 | static struct encoder_config enc_config; /* Current encoder configuration */ | 100 | static struct encoder_config enc_config; /* Current encoder configuration */ |
101 | static unsigned long pre_record_ticks; /* pre-record time in ticks */ | 101 | static unsigned long pre_record_ticks; /* pre-record time in ticks */ |
102 | 102 | ||
103 | /**************************************************************************** | 103 | /**************************************************************************** |
104 | use 2 circular buffers: | 104 | use 2 circular buffers: |
105 | pcm_buffer=DMA output buffer: chunks (8192 Bytes) of raw pcm audio data | 105 | pcm_buffer=DMA output buffer: chunks (8192 Bytes) of raw pcm audio data |
@@ -166,7 +166,7 @@ static size_t enc_chunk_size; /* maximum encoder chunk size */ | |||
166 | static unsigned long enc_sample_rate; /* sample rate used by encoder */ | 166 | static unsigned long enc_sample_rate; /* sample rate used by encoder */ |
167 | static bool pcmrec_context = false; /* called by pcmrec thread? */ | 167 | static bool pcmrec_context = false; /* called by pcmrec thread? */ |
168 | static bool pcm_buffer_empty; /* all pcm chunks processed? */ | 168 | static bool pcm_buffer_empty; /* all pcm chunks processed? */ |
169 | 169 | ||
170 | /** file flushing **/ | 170 | /** file flushing **/ |
171 | static int low_watermark; /* Low watermark to stop flush */ | 171 | static int low_watermark; /* Low watermark to stop flush */ |
172 | static int high_watermark; /* max chunk limit for data flush */ | 172 | static int high_watermark; /* max chunk limit for data flush */ |
@@ -259,7 +259,7 @@ static void pcmrec_raise_warning_status(unsigned long w) | |||
259 | { | 259 | { |
260 | warnings |= w; | 260 | warnings |= w; |
261 | } | 261 | } |
262 | 262 | ||
263 | /* Callback for when more data is ready - called in interrupt context */ | 263 | /* Callback for when more data is ready - called in interrupt context */ |
264 | static void pcm_rec_have_more(void **start, size_t *size) | 264 | static void pcm_rec_have_more(void **start, size_t *size) |
265 | { | 265 | { |
@@ -457,7 +457,7 @@ void audio_pause_recording(void) | |||
457 | 457 | ||
458 | /** | 458 | /** |
459 | * Resume current recording if paused | 459 | * Resume current recording if paused |
460 | */ | 460 | */ |
461 | void audio_resume_recording(void) | 461 | void audio_resume_recording(void) |
462 | { | 462 | { |
463 | logf("audio_resume_recording"); | 463 | logf("audio_resume_recording"); |
@@ -466,11 +466,11 @@ void audio_resume_recording(void) | |||
466 | } /* audio_resume_recording */ | 466 | } /* audio_resume_recording */ |
467 | 467 | ||
468 | /** | 468 | /** |
469 | * Note that microphone is mono, only left value is used | 469 | * Note that microphone is mono, only left value is used |
470 | * See audiohw_set_recvol() for exact ranges. | 470 | * See audiohw_set_recvol() for exact ranges. |
471 | * | 471 | * |
472 | * @param type AUDIO_GAIN_MIC, AUDIO_GAIN_LINEIN | 472 | * @param type AUDIO_GAIN_MIC, AUDIO_GAIN_LINEIN |
473 | * | 473 | * |
474 | */ | 474 | */ |
475 | void audio_set_recording_gain(int left, int right, int type) | 475 | void audio_set_recording_gain(int left, int right, int type) |
476 | { | 476 | { |
@@ -503,7 +503,7 @@ unsigned long audio_num_recorded_bytes(void) | |||
503 | 503 | ||
504 | return num_rec_bytes; | 504 | return num_rec_bytes; |
505 | } /* audio_num_recorded_bytes */ | 505 | } /* audio_num_recorded_bytes */ |
506 | 506 | ||
507 | /***************************************************************************/ | 507 | /***************************************************************************/ |
508 | /* */ | 508 | /* */ |
509 | /* Functions that execute in the context of audio thread */ | 509 | /* Functions that execute in the context of audio thread */ |
@@ -559,14 +559,14 @@ static inline void pcmrec_fnq_set_empty(void) | |||
559 | { | 559 | { |
560 | fnq_rd_pos = fnq_wr_pos; | 560 | fnq_rd_pos = fnq_wr_pos; |
561 | } /* pcmrec_fnq_set_empty */ | 561 | } /* pcmrec_fnq_set_empty */ |
562 | 562 | ||
563 | /* returns true if the queue is full */ | 563 | /* returns true if the queue is full */ |
564 | static bool pcmrec_fnq_is_full(void) | 564 | static bool pcmrec_fnq_is_full(void) |
565 | { | 565 | { |
566 | ssize_t size = fnq_wr_pos - fnq_rd_pos; | 566 | ssize_t size = fnq_wr_pos - fnq_rd_pos; |
567 | if (size < 0) | 567 | if (size < 0) |
568 | size += fnq_size; | 568 | size += fnq_size; |
569 | 569 | ||
570 | return size >= fnq_size - MAX_PATH; | 570 | return size >= fnq_size - MAX_PATH; |
571 | } /* pcmrec_fnq_is_full */ | 571 | } /* pcmrec_fnq_is_full */ |
572 | 572 | ||
@@ -575,7 +575,7 @@ static bool pcmrec_fnq_add_filename(const char *filename) | |||
575 | { | 575 | { |
576 | strlcpy(fn_queue + fnq_wr_pos, filename, MAX_PATH); | 576 | strlcpy(fn_queue + fnq_wr_pos, filename, MAX_PATH); |
577 | fnq_wr_pos = FNQ_NEXT(fnq_wr_pos); | 577 | fnq_wr_pos = FNQ_NEXT(fnq_wr_pos); |
578 | 578 | ||
579 | if (fnq_rd_pos != fnq_wr_pos) | 579 | if (fnq_rd_pos != fnq_wr_pos) |
580 | return true; | 580 | return true; |
581 | 581 | ||
@@ -607,7 +607,7 @@ static bool pcmrec_fnq_get_filename(char *filename) | |||
607 | 607 | ||
608 | if (filename) | 608 | if (filename) |
609 | strlcpy(filename, fn_queue + fnq_rd_pos, MAX_PATH); | 609 | strlcpy(filename, fn_queue + fnq_rd_pos, MAX_PATH); |
610 | 610 | ||
611 | fnq_rd_pos = FNQ_NEXT(fnq_rd_pos); | 611 | fnq_rd_pos = FNQ_NEXT(fnq_rd_pos); |
612 | return true; | 612 | return true; |
613 | } /* pcmrec_fnq_get_filename */ | 613 | } /* pcmrec_fnq_get_filename */ |
@@ -683,7 +683,7 @@ static void pcmrec_start_file(void) | |||
683 | logf("start file: file already open"); | 683 | logf("start file: file already open"); |
684 | pcmrec_raise_error_status(PCMREC_E_FNQ_DESYNC); | 684 | pcmrec_raise_error_status(PCMREC_E_FNQ_DESYNC); |
685 | } | 685 | } |
686 | 686 | ||
687 | if (errors != 0) | 687 | if (errors != 0) |
688 | rec_fdata.chunk->flags |= CHUNKF_ERROR; | 688 | rec_fdata.chunk->flags |= CHUNKF_ERROR; |
689 | 689 | ||
@@ -709,7 +709,7 @@ static void pcmrec_start_file(void) | |||
709 | { | 709 | { |
710 | pcmrec_update_sizes(enc_size, num_pcm); | 710 | pcmrec_update_sizes(enc_size, num_pcm); |
711 | } | 711 | } |
712 | 712 | ||
713 | rec_fdata.chunk->flags &= ~CHUNKF_START_FILE; | 713 | rec_fdata.chunk->flags &= ~CHUNKF_START_FILE; |
714 | } /* pcmrec_start_file */ | 714 | } /* pcmrec_start_file */ |
715 | 715 | ||
@@ -893,7 +893,7 @@ static void pcmrec_flush(unsigned flush_num) | |||
893 | logf("writing:%d(%d):%s%s", num_ready, flush_num, | 893 | logf("writing:%d(%d):%s%s", num_ready, flush_num, |
894 | interruptable ? "i" : "", | 894 | interruptable ? "i" : "", |
895 | flush_num == PCMREC_FLUSH_MINI ? "m" : ""); | 895 | flush_num == PCMREC_FLUSH_MINI ? "m" : ""); |
896 | 896 | ||
897 | cpu_boost(true); | 897 | cpu_boost(true); |
898 | 898 | ||
899 | remaining = flush_num; | 899 | remaining = flush_num; |
@@ -1077,7 +1077,7 @@ static void pcmrec_new_stream(const char *filename, /* next file name */ | |||
1077 | logf("stream prerecord start"); | 1077 | logf("stream prerecord start"); |
1078 | start = data.pre_chunk = GET_ENC_CHUNK(pre_index); | 1078 | start = data.pre_chunk = GET_ENC_CHUNK(pre_index); |
1079 | start->flags &= CHUNKF_START_FILE | CHUNKF_PRERECORD; | 1079 | start->flags &= CHUNKF_START_FILE | CHUNKF_PRERECORD; |
1080 | } | 1080 | } |
1081 | else | 1081 | else |
1082 | { | 1082 | { |
1083 | logf("stream normal start"); | 1083 | logf("stream normal start"); |
@@ -1145,7 +1145,7 @@ static void pcmrec_new_stream(const char *filename, /* next file name */ | |||
1145 | pcmrec_flush(PCMREC_FLUSH_ALL); | 1145 | pcmrec_flush(PCMREC_FLUSH_ALL); |
1146 | did_flush = true; | 1146 | did_flush = true; |
1147 | } | 1147 | } |
1148 | 1148 | ||
1149 | fnq_add_fn(path); | 1149 | fnq_add_fn(path); |
1150 | } | 1150 | } |
1151 | 1151 | ||
@@ -1271,7 +1271,7 @@ static void pcmrec_record(const char *filename) | |||
1271 | num_rec_bytes = 0; | 1271 | num_rec_bytes = 0; |
1272 | num_rec_samples = 0; | 1272 | num_rec_samples = 0; |
1273 | 1273 | ||
1274 | if (!is_recording) | 1274 | if (!is_recording) |
1275 | { | 1275 | { |
1276 | #if 0 | 1276 | #if 0 |
1277 | accum_rec_bytes = 0; | 1277 | accum_rec_bytes = 0; |
@@ -1371,7 +1371,7 @@ static void pcmrec_record(const char *filename) | |||
1371 | static void pcmrec_stop(void) | 1371 | static void pcmrec_stop(void) |
1372 | { | 1372 | { |
1373 | logf("pcmrec_stop"); | 1373 | logf("pcmrec_stop"); |
1374 | 1374 | ||
1375 | if (is_recording) | 1375 | if (is_recording) |
1376 | { | 1376 | { |
1377 | dma_lock = true; /* lock dma write position */ | 1377 | dma_lock = true; /* lock dma write position */ |
@@ -1401,7 +1401,7 @@ static void pcmrec_stop(void) | |||
1401 | { | 1401 | { |
1402 | logf("fnq: not empty!"); | 1402 | logf("fnq: not empty!"); |
1403 | pcmrec_fnq_set_empty(); | 1403 | pcmrec_fnq_set_empty(); |
1404 | } | 1404 | } |
1405 | 1405 | ||
1406 | /* be absolutely sure the file is closed */ | 1406 | /* be absolutely sure the file is closed */ |
1407 | if (errors != 0) | 1407 | if (errors != 0) |
@@ -1446,7 +1446,7 @@ static void pcmrec_pause(void) | |||
1446 | static void pcmrec_resume(void) | 1446 | static void pcmrec_resume(void) |
1447 | { | 1447 | { |
1448 | logf("pcmrec_resume"); | 1448 | logf("pcmrec_resume"); |
1449 | 1449 | ||
1450 | if (!is_recording) | 1450 | if (!is_recording) |
1451 | { | 1451 | { |
1452 | logf("not recording"); | 1452 | logf("not recording"); |
@@ -1593,7 +1593,7 @@ void enc_set_parameters(struct enc_parameters *params) | |||
1593 | 1593 | ||
1594 | enc_num_chunks = bufsize / enc_chunk_size; | 1594 | enc_num_chunks = bufsize / enc_chunk_size; |
1595 | logf("num chunks:%d", enc_num_chunks); | 1595 | logf("num chunks:%d", enc_num_chunks); |
1596 | 1596 | ||
1597 | /* get real amount used by encoder chunks */ | 1597 | /* get real amount used by encoder chunks */ |
1598 | bufsize = enc_num_chunks*enc_chunk_size; | 1598 | bufsize = enc_num_chunks*enc_chunk_size; |
1599 | logf("enc size:%lu", bufsize); | 1599 | logf("enc size:%lu", bufsize); |
@@ -1674,7 +1674,7 @@ struct enc_chunk_hdr * enc_get_chunk(void) | |||
1674 | return chunk; | 1674 | return chunk; |
1675 | } /* enc_get_chunk */ | 1675 | } /* enc_get_chunk */ |
1676 | 1676 | ||
1677 | /* releases the current chunk into the available chunks - | 1677 | /* releases the current chunk into the available chunks - |
1678 | NOTE: can be called by pcmrec thread when splitting streams */ | 1678 | NOTE: can be called by pcmrec thread when splitting streams */ |
1679 | void enc_finish_chunk(void) | 1679 | void enc_finish_chunk(void) |
1680 | { | 1680 | { |
diff --git a/apps/recorder/recording.c b/apps/recorder/recording.c index 53dc5cbf95..4893f589f1 100644 --- a/apps/recorder/recording.c +++ b/apps/recorder/recording.c | |||
@@ -280,7 +280,7 @@ static void set_gain(void) | |||
280 | { | 280 | { |
281 | if (global_settings.rec_mic_gain > sound_max(SOUND_MIC_GAIN)) | 281 | if (global_settings.rec_mic_gain > sound_max(SOUND_MIC_GAIN)) |
282 | global_settings.rec_mic_gain = sound_max(SOUND_MIC_GAIN); | 282 | global_settings.rec_mic_gain = sound_max(SOUND_MIC_GAIN); |
283 | 283 | ||
284 | if (global_settings.rec_mic_gain < sound_min(SOUND_MIC_GAIN)) | 284 | if (global_settings.rec_mic_gain < sound_min(SOUND_MIC_GAIN)) |
285 | global_settings.rec_mic_gain = sound_min(SOUND_MIC_GAIN); | 285 | global_settings.rec_mic_gain = sound_min(SOUND_MIC_GAIN); |
286 | 286 | ||
@@ -301,7 +301,7 @@ static void set_gain(void) | |||
301 | 301 | ||
302 | if (global_settings.rec_right_gain < sound_min(SOUND_RIGHT_GAIN)) | 302 | if (global_settings.rec_right_gain < sound_min(SOUND_RIGHT_GAIN)) |
303 | global_settings.rec_right_gain = sound_min(SOUND_RIGHT_GAIN); | 303 | global_settings.rec_right_gain = sound_min(SOUND_RIGHT_GAIN); |
304 | 304 | ||
305 | /* AUDIO_SRC_LINEIN, AUDIO_SRC_FMRADIO, AUDIO_SRC_SPDIF */ | 305 | /* AUDIO_SRC_LINEIN, AUDIO_SRC_FMRADIO, AUDIO_SRC_SPDIF */ |
306 | audio_set_recording_gain(global_settings.rec_left_gain, | 306 | audio_set_recording_gain(global_settings.rec_left_gain, |
307 | global_settings.rec_right_gain, | 307 | global_settings.rec_right_gain, |
@@ -327,7 +327,7 @@ static bool read_peak_levels(int *peak_l, int *peak_r, int *balance) | |||
327 | return false; | 327 | return false; |
328 | 328 | ||
329 | if (*peak_r > *peak_l) | 329 | if (*peak_r > *peak_l) |
330 | balance_mem[peak_time % BAL_MEM_SIZE] = (*peak_l ? | 330 | balance_mem[peak_time % BAL_MEM_SIZE] = (*peak_l ? |
331 | MIN((10000 * *peak_r) / *peak_l - 10000, 15118) : 15118); | 331 | MIN((10000 * *peak_r) / *peak_l - 10000, 15118) : 15118); |
332 | else | 332 | else |
333 | balance_mem[peak_time % BAL_MEM_SIZE] = (*peak_r ? | 333 | balance_mem[peak_time % BAL_MEM_SIZE] = (*peak_r ? |
@@ -394,7 +394,7 @@ static void change_recording_gain(bool increment, bool left, bool right) | |||
394 | } | 394 | } |
395 | } | 395 | } |
396 | 396 | ||
397 | /* | 397 | /* |
398 | * Handle automatic gain control (AGC). | 398 | * Handle automatic gain control (AGC). |
399 | * Change recording gain if peak_x levels are above or below | 399 | * Change recording gain if peak_x levels are above or below |
400 | * target volume for specified timeouts. | 400 | * target volume for specified timeouts. |
@@ -645,7 +645,7 @@ int rec_create_directory(void) | |||
645 | { | 645 | { |
646 | while (action_userabort(HZ) == false) | 646 | while (action_userabort(HZ) == false) |
647 | { | 647 | { |
648 | splashf(0, "%s %s", | 648 | splashf(0, "%s %s", |
649 | str(LANG_REC_DIR_NOT_WRITABLE), | 649 | str(LANG_REC_DIR_NOT_WRITABLE), |
650 | str(LANG_OFF_ABORT)); | 650 | str(LANG_OFF_ABORT)); |
651 | } | 651 | } |
@@ -1050,7 +1050,7 @@ bool recording_screen(bool no_source) | |||
1050 | int trig_ypos[NB_SCREENS]; /* trigger bar y pos */ | 1050 | int trig_ypos[NB_SCREENS]; /* trigger bar y pos */ |
1051 | int trig_width[NB_SCREENS]; /* trigger bar width */ | 1051 | int trig_width[NB_SCREENS]; /* trigger bar width */ |
1052 | int top_height_req[NB_SCREENS]; /* required height for top half */ | 1052 | int top_height_req[NB_SCREENS]; /* required height for top half */ |
1053 | /* tweak layout tiny screens / big fonts */ | 1053 | /* tweak layout tiny screens / big fonts */ |
1054 | bool compact_view[NB_SCREENS] = { false }; | 1054 | bool compact_view[NB_SCREENS] = { false }; |
1055 | struct gui_synclist lists; /* the list in the bottom vp */ | 1055 | struct gui_synclist lists; /* the list in the bottom vp */ |
1056 | #if defined(HAVE_AGC) | 1056 | #if defined(HAVE_AGC) |
@@ -1445,7 +1445,7 @@ bool recording_screen(bool no_source) | |||
1445 | #ifdef HAVE_MIC_REC | 1445 | #ifdef HAVE_MIC_REC |
1446 | if(global_settings.rec_source == AUDIO_SRC_MIC) | 1446 | if(global_settings.rec_source == AUDIO_SRC_MIC) |
1447 | { | 1447 | { |
1448 | global_settings.rec_mic_gain -= | 1448 | global_settings.rec_mic_gain -= |
1449 | sound_steps(SOUND_MIC_GAIN); | 1449 | sound_steps(SOUND_MIC_GAIN); |
1450 | } | 1450 | } |
1451 | else | 1451 | else |