Rockbox open source high quality audio player as a Music Player Daemon
mpris rockbox mpd libadwaita audio rust zig deno
2
fork

Configure Feed

Select the types of activity you want to include in your feed.

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>

+80 -80
+1 -1
apps/playback.c
··· 787 787 allocsize = ALIGN_UP(allocsize, sizeof (intptr_t)); 788 788 if (allocsize > filebuflen) 789 789 goto bufpanic; 790 - 790 + 791 791 filebuflen -= allocsize; 792 792 793 793 /* Scratch memory */
+22 -22
apps/recorder/pcm_record.c
··· 99 99 static int rec_mono_mode; /* how mono is created */ 100 100 static struct encoder_config enc_config; /* Current encoder configuration */ 101 101 static unsigned long pre_record_ticks; /* pre-record time in ticks */ 102 - 102 + 103 103 /**************************************************************************** 104 104 use 2 circular buffers: 105 105 pcm_buffer=DMA output buffer: chunks (8192 Bytes) of raw pcm audio data ··· 166 166 static unsigned long enc_sample_rate; /* sample rate used by encoder */ 167 167 static bool pcmrec_context = false; /* called by pcmrec thread? */ 168 168 static bool pcm_buffer_empty; /* all pcm chunks processed? */ 169 - 169 + 170 170 /** file flushing **/ 171 171 static int low_watermark; /* Low watermark to stop flush */ 172 172 static int high_watermark; /* max chunk limit for data flush */ ··· 259 259 { 260 260 warnings |= w; 261 261 } 262 - 262 + 263 263 /* Callback for when more data is ready - called in interrupt context */ 264 264 static void pcm_rec_have_more(void **start, size_t *size) 265 265 { ··· 457 457 458 458 /** 459 459 * Resume current recording if paused 460 - */ 460 + */ 461 461 void audio_resume_recording(void) 462 462 { 463 463 logf("audio_resume_recording"); ··· 466 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 470 * See audiohw_set_recvol() for exact ranges. 471 471 * 472 472 * @param type AUDIO_GAIN_MIC, AUDIO_GAIN_LINEIN 473 - * 473 + * 474 474 */ 475 475 void audio_set_recording_gain(int left, int right, int type) 476 476 { ··· 503 503 504 504 return num_rec_bytes; 505 505 } /* audio_num_recorded_bytes */ 506 - 506 + 507 507 /***************************************************************************/ 508 508 /* */ 509 509 /* Functions that execute in the context of audio thread */ ··· 559 559 { 560 560 fnq_rd_pos = fnq_wr_pos; 561 561 } /* pcmrec_fnq_set_empty */ 562 - 562 + 563 563 /* returns true if the queue is full */ 564 564 static bool pcmrec_fnq_is_full(void) 565 565 { 566 566 ssize_t size = fnq_wr_pos - fnq_rd_pos; 567 567 if (size < 0) 568 568 size += fnq_size; 569 - 569 + 570 570 return size >= fnq_size - MAX_PATH; 571 571 } /* pcmrec_fnq_is_full */ 572 572 ··· 575 575 { 576 576 strlcpy(fn_queue + fnq_wr_pos, filename, MAX_PATH); 577 577 fnq_wr_pos = FNQ_NEXT(fnq_wr_pos); 578 - 578 + 579 579 if (fnq_rd_pos != fnq_wr_pos) 580 580 return true; 581 581 ··· 607 607 608 608 if (filename) 609 609 strlcpy(filename, fn_queue + fnq_rd_pos, MAX_PATH); 610 - 610 + 611 611 fnq_rd_pos = FNQ_NEXT(fnq_rd_pos); 612 612 return true; 613 613 } /* pcmrec_fnq_get_filename */ ··· 683 683 logf("start file: file already open"); 684 684 pcmrec_raise_error_status(PCMREC_E_FNQ_DESYNC); 685 685 } 686 - 686 + 687 687 if (errors != 0) 688 688 rec_fdata.chunk->flags |= CHUNKF_ERROR; 689 689 ··· 709 709 { 710 710 pcmrec_update_sizes(enc_size, num_pcm); 711 711 } 712 - 712 + 713 713 rec_fdata.chunk->flags &= ~CHUNKF_START_FILE; 714 714 } /* pcmrec_start_file */ 715 715 ··· 893 893 logf("writing:%d(%d):%s%s", num_ready, flush_num, 894 894 interruptable ? "i" : "", 895 895 flush_num == PCMREC_FLUSH_MINI ? "m" : ""); 896 - 896 + 897 897 cpu_boost(true); 898 898 899 899 remaining = flush_num; ··· 1077 1077 logf("stream prerecord start"); 1078 1078 start = data.pre_chunk = GET_ENC_CHUNK(pre_index); 1079 1079 start->flags &= CHUNKF_START_FILE | CHUNKF_PRERECORD; 1080 - } 1080 + } 1081 1081 else 1082 1082 { 1083 1083 logf("stream normal start"); ··· 1145 1145 pcmrec_flush(PCMREC_FLUSH_ALL); 1146 1146 did_flush = true; 1147 1147 } 1148 - 1148 + 1149 1149 fnq_add_fn(path); 1150 1150 } 1151 1151 ··· 1271 1271 num_rec_bytes = 0; 1272 1272 num_rec_samples = 0; 1273 1273 1274 - if (!is_recording) 1274 + if (!is_recording) 1275 1275 { 1276 1276 #if 0 1277 1277 accum_rec_bytes = 0; ··· 1371 1371 static void pcmrec_stop(void) 1372 1372 { 1373 1373 logf("pcmrec_stop"); 1374 - 1374 + 1375 1375 if (is_recording) 1376 1376 { 1377 1377 dma_lock = true; /* lock dma write position */ ··· 1401 1401 { 1402 1402 logf("fnq: not empty!"); 1403 1403 pcmrec_fnq_set_empty(); 1404 - } 1404 + } 1405 1405 1406 1406 /* be absolutely sure the file is closed */ 1407 1407 if (errors != 0) ··· 1446 1446 static void pcmrec_resume(void) 1447 1447 { 1448 1448 logf("pcmrec_resume"); 1449 - 1449 + 1450 1450 if (!is_recording) 1451 1451 { 1452 1452 logf("not recording"); ··· 1593 1593 1594 1594 enc_num_chunks = bufsize / enc_chunk_size; 1595 1595 logf("num chunks:%d", enc_num_chunks); 1596 - 1596 + 1597 1597 /* get real amount used by encoder chunks */ 1598 1598 bufsize = enc_num_chunks*enc_chunk_size; 1599 1599 logf("enc size:%lu", bufsize); ··· 1674 1674 return chunk; 1675 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 1678 NOTE: can be called by pcmrec thread when splitting streams */ 1679 1679 void enc_finish_chunk(void) 1680 1680 {
+7 -7
apps/recorder/recording.c
··· 280 280 { 281 281 if (global_settings.rec_mic_gain > sound_max(SOUND_MIC_GAIN)) 282 282 global_settings.rec_mic_gain = sound_max(SOUND_MIC_GAIN); 283 - 283 + 284 284 if (global_settings.rec_mic_gain < sound_min(SOUND_MIC_GAIN)) 285 285 global_settings.rec_mic_gain = sound_min(SOUND_MIC_GAIN); 286 286 ··· 301 301 302 302 if (global_settings.rec_right_gain < sound_min(SOUND_RIGHT_GAIN)) 303 303 global_settings.rec_right_gain = sound_min(SOUND_RIGHT_GAIN); 304 - 304 + 305 305 /* AUDIO_SRC_LINEIN, AUDIO_SRC_FMRADIO, AUDIO_SRC_SPDIF */ 306 306 audio_set_recording_gain(global_settings.rec_left_gain, 307 307 global_settings.rec_right_gain, ··· 327 327 return false; 328 328 329 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 331 MIN((10000 * *peak_r) / *peak_l - 10000, 15118) : 15118); 332 332 else 333 333 balance_mem[peak_time % BAL_MEM_SIZE] = (*peak_r ? ··· 394 394 } 395 395 } 396 396 397 - /* 397 + /* 398 398 * Handle automatic gain control (AGC). 399 399 * Change recording gain if peak_x levels are above or below 400 400 * target volume for specified timeouts. ··· 645 645 { 646 646 while (action_userabort(HZ) == false) 647 647 { 648 - splashf(0, "%s %s", 648 + splashf(0, "%s %s", 649 649 str(LANG_REC_DIR_NOT_WRITABLE), 650 650 str(LANG_OFF_ABORT)); 651 651 } ··· 1050 1050 int trig_ypos[NB_SCREENS]; /* trigger bar y pos */ 1051 1051 int trig_width[NB_SCREENS]; /* trigger bar width */ 1052 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 1054 bool compact_view[NB_SCREENS] = { false }; 1055 1055 struct gui_synclist lists; /* the list in the bottom vp */ 1056 1056 #if defined(HAVE_AGC) ··· 1445 1445 #ifdef HAVE_MIC_REC 1446 1446 if(global_settings.rec_source == AUDIO_SRC_MIC) 1447 1447 { 1448 - global_settings.rec_mic_gain -= 1448 + global_settings.rec_mic_gain -= 1449 1449 sound_steps(SOUND_MIC_GAIN); 1450 1450 } 1451 1451 else
+11 -11
firmware/export/audio.h
··· 77 77 78 78 /* Required call when audio buffer is required for some other purpose */ 79 79 /* implemented in apps but called from firmware(!) */ 80 - unsigned char *audio_get_buffer(bool talk_buf, size_t *buffer_size); 80 + unsigned char *audio_get_buffer(bool talk_buf, size_t *buffer_size); 81 81 82 82 #if CONFIG_CODEC == SWCODEC 83 83 void audio_next_dir(void); ··· 257 257 /***********************************************************************/ 258 258 /* handler return codes */ 259 259 260 - #define AUDIO_EVENT_RC_IGNORED 200 260 + #define AUDIO_EVENT_RC_IGNORED 200 261 261 /* indicates that no action was taken or the event was not recognized */ 262 262 263 - #define AUDIO_EVENT_RC_HANDLED 201 264 - /* indicates that the event was handled and some action was taken which renders 265 - the original event invalid; USE WITH CARE!; this return code aborts all further 263 + #define AUDIO_EVENT_RC_HANDLED 201 264 + /* indicates that the event was handled and some action was taken which renders 265 + the original event invalid; USE WITH CARE!; this return code aborts all further 266 266 processing of the given event */ 267 267 268 268 /***********************************************************************/ 269 269 /* audio event IDs */ 270 270 271 - #define AUDIO_EVENT_POS_REPORT (1<<0) 271 + #define AUDIO_EVENT_POS_REPORT (1<<0) 272 272 /* sends a periodic song position report to handlers; a report is sent on 273 - each kernal tick; the number of ticks per second is defined by HZ; on each 274 - report the current song position is passed in 'data'; if a handler takes an 275 - action that changes the song or the song position it must return 273 + each kernal tick; the number of ticks per second is defined by HZ; on each 274 + report the current song position is passed in 'data'; if a handler takes an 275 + action that changes the song or the song position it must return 276 276 AUDIO_EVENT_RC_HANDLED which suppresses the event for any remaining handlers */ 277 277 278 - #define AUDIO_EVENT_END_OF_TRACK (1<<1) 278 + #define AUDIO_EVENT_END_OF_TRACK (1<<1) 279 279 /* generated when the end of the currently playing track is reached; no 280 280 data is passed; if the handler implements some alternate end-of-track 281 281 processing it should return AUDIO_EVENT_RC_HANDLED which suppresses the 282 - event for any remaining handlers as well as the normal end-of-track 282 + event for any remaining handlers as well as the normal end-of-track 283 283 processing */ 284 284 285 285 #endif
+2 -2
firmware/export/enc_base.h
··· 145 145 struct mp3_enc_config mp3_enc; 146 146 struct wavpack_enc_config wavpack_enc; 147 147 struct wav_enc_config wav_enc; 148 - }; 148 + }; 149 149 }; 150 150 151 151 /** Encoder chunk macros and definitions **/ ··· 218 218 unsigned long new_num_pcm; /* New number of pcm in chunk */ 219 219 const char *filename; /* filename to open if ENC_START_FILE */ 220 220 int rec_file; /* Current file or < 0 if none */ 221 - unsigned long num_pcm_samples; /* Current pcm sample count written to 221 + unsigned long num_pcm_samples; /* Current pcm sample count written to 222 222 file so far. */ 223 223 }; 224 224
+5 -5
lib/rbcodec/codecs/codecs.h
··· 107 107 struct codec_api { 108 108 off_t filesize; /* Total file length */ 109 109 off_t curpos; /* Current buffer position */ 110 - 110 + 111 111 struct mp3entry *id3; /* TAG metadata pointer */ 112 112 int audio_hid; /* Current audio handle */ 113 - 113 + 114 114 /* The dsp instance to be used for audio output */ 115 115 struct dsp_config *dsp; 116 - 116 + 117 117 /* Returns buffer to malloc array. Only codeclib should need this. */ 118 118 void* (*codec_get_buffer)(size_t *size); 119 119 /* Insert PCM data into audio buffer for playback. Playback will start ··· 121 121 void (*pcmbuf_insert)(const void *ch1, const void *ch2, int count); 122 122 /* Set song position in WPS (value in ms). */ 123 123 void (*set_elapsed)(unsigned long value); 124 - 124 + 125 125 /* Read next <size> amount bytes from file buffer to <ptr>. 126 126 Will return number of bytes read or 0 if end of file. */ 127 127 size_t (*read_filebuf)(void *ptr, size_t size); ··· 198 198 void (*profile_func_enter)(void *this_fn, void *call_site); 199 199 void (*profile_func_exit)(void *this_fn, void *call_site); 200 200 #endif 201 - 201 + 202 202 #ifdef HAVE_RECORDING 203 203 void (*enc_get_inputs)(struct enc_inputs *inputs); 204 204 void (*enc_set_parameters)(struct enc_parameters *params);
+26 -26
lib/rbcodec/codecs/mp3_enc.c
··· 185 185 { {15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }, /* table1 */ 186 186 { 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8 } } }; /* hleng1 */ 187 187 188 - static const uint8_t t1HB_const[4] = {1,1,1,0}; 188 + static const uint8_t t1HB_const[4] = {1,1,1,0}; 189 189 static const uint8_t t2HB_const[9] = {1,2,1,3,1,1,3,2,0}; 190 190 static const uint8_t t3HB_const[9] = {3,2,1,1,1,1,3,2,0}; 191 191 static const uint8_t t5HB_const[16] = {1,2,6,5,3,1,4,4,7,5,7,1,6,1,1,0}; ··· 739 739 509,509,509,509,509,509,509,509,509,509,510,510,510,510,510,510,510,510,510,510, 740 740 510,511,511,511,511,511,511,511,511,511,511,512,512,512,512,512 }; 741 741 742 - static const int order[32] = 742 + static const int order[32] = 743 743 { 0, 1, 16, 17, 8, 9, 24, 25, 4, 5, 20, 21, 12, 13, 28, 29, 744 744 2, 3, 18, 19,10,11, 26, 27, 6, 7, 22, 23, 14, 15, 30, 31 }; 745 745 746 - static const long sampr_index[2][3] = 746 + static const long sampr_index[2][3] = 747 747 { { 22050, 24000, 16000 }, /* MPEG 2 */ 748 748 { 44100, 48000, 32000 } }; /* MPEG 1 */ 749 749 ··· 765 765 static const int cs_const[8] = 766 766 { 28098, 28893, 31117, 32221, 32621, 32740, 32765, 32768 }; 767 767 768 - static const short enwindow_const[15*27+24] = 768 + static const short enwindow_const[15*27+24] = 769 769 { 0, 65, 593, 1766, 22228, 2115, 611, 62, 770 770 8, 119, 1419, 10564,-11659,-1635,-154, -9, 771 771 -8, -119,-1419,-10564, 11659, 1635, 154, 9, 464, 100, 91, ··· 853 853 { 854 854 int gr, ch, header; 855 855 uint32_t cc=0, sz=0; 856 - 856 + 857 857 /* 858 858 * MPEG header layout: 859 859 * AAAAAAAA AAABBCCD EEEEFFGH IIJJKLMM ··· 960 960 961 961 if(bigvals > region2) 962 962 bits += HuffmanCode(ix, xr_sign, region2, bigvals, gi->table_select[2]); 963 - 963 + 964 964 if(count1 > bigvals) 965 965 bits += HuffmanCod1(ix, xr_sign, bigvals, count1, gi->table_select[3]); 966 966 ··· 1158 1158 { 1159 1159 uint32_t i; 1160 1160 int max, table0, table1; 1161 - 1161 + 1162 1162 for(i=begin,max=0; i<end; i++) 1163 1163 if(ix[i] > max) 1164 1164 max = ix[i]; ··· 1315 1315 int w = ix[i-2]; 1316 1316 int x = ix[i-3]; 1317 1317 int y = ix[i-4]; 1318 - 1318 + 1319 1319 if((v | w | x | y) <= 1) 1320 1320 { 1321 1321 p = (y<<3) + (x<<2) + (w<<1) + (v); ··· 1380 1380 static void subdivide(side_info_t *si) 1381 1381 { 1382 1382 int scfb, count0, count1; 1383 - 1383 + 1384 1384 if( !si->address3 ) 1385 1385 { /* no bigvalue region */ 1386 1386 si->region_0_1 = 0; ··· 1442 1442 1443 1443 /************************************************************************/ 1444 1444 /* The code selects the best quantStep for a particular set of scalefacs*/ 1445 - /************************************************************************/ 1445 + /************************************************************************/ 1446 1446 static int inner_loop(int *xr, int max_bits, side_info_t *si) 1447 1447 { 1448 1448 int bits; ··· 1783 1783 a[ 7] -= a[ 6]; 1784 1784 a[22] -= a[ 7]; 1785 1785 a[23] -= a[22]; 1786 - 1786 + 1787 1787 xr = a[ 6]; a[ 6] = a[31] - xr; a[31] = a[31] + xr; 1788 1788 xr = a[ 7]; a[ 7] = a[30] - xr; a[30] = a[30] + xr; 1789 1789 xr = a[22]; a[22] = a[15] - xr; a[15] = a[15] + xr; ··· 1803 1803 xr = a[ 1] - a[13]; a[ 1] += a[13]; a[13] = shft9(xr) * wp[ -4*27+25]; 1804 1804 xr = a[16] - a[28]; a[16] += a[28]; a[28] = shft9(xr) * wp[ -4*27+25]; 1805 1805 xr =-a[17] + a[29]; a[17] += a[29]; a[29] = shft9(xr) * wp[ -4*27+25]; 1806 - 1806 + 1807 1807 xr = SQRT * shft9(a[ 2] - a[10]); a[ 2] += a[10]; a[10] = xr; 1808 1808 xr = SQRT * shft9(a[ 3] - a[11]); a[ 3] += a[11]; a[11] = xr; 1809 1809 xr = SQRT * shft9(a[26] - a[18]); a[18] += a[26]; a[26] = xr - a[18]; 1810 1810 xr = SQRT * shft9(a[27] - a[19]); a[19] += a[27]; a[27] = xr - a[19]; 1811 - 1811 + 1812 1812 xr = a[ 2]; a[19] -= a[ 3]; a[ 3] -= xr; a[ 2] = a[31] - xr; a[31] += xr; 1813 1813 xr = a[ 3]; a[11] -= a[19]; a[18] -= xr; a[ 3] = a[30] - xr; a[30] += xr; 1814 1814 xr = a[18]; a[27] -= a[11]; a[19] -= xr; a[18] = a[15] - xr; a[15] += xr; 1815 - 1815 + 1816 1816 xr = a[19]; a[10] -= xr; a[19] = a[14] - xr; a[14] += xr; 1817 1817 xr = a[10]; a[11] -= xr; a[10] = a[23] - xr; a[23] += xr; 1818 1818 xr = a[11]; a[26] -= xr; a[11] = a[22] - xr; a[22] += xr; 1819 1819 xr = a[26]; a[27] -= xr; a[26] = a[ 7] - xr; a[ 7] += xr; 1820 - 1820 + 1821 1821 xr = a[27]; a[27] = a[6] - xr; a[6] += xr; 1822 - 1822 + 1823 1823 xr = SQRT * shft9(a[ 0] - a[ 4]); a[ 0] += a[ 4]; a[ 4] = xr; 1824 1824 xr = SQRT * shft9(a[ 1] - a[ 5]); a[ 1] += a[ 5]; a[ 5] = xr; 1825 1825 xr = SQRT * shft9(a[16] - a[20]); a[16] += a[20]; a[20] = xr; ··· 1828 1828 xr =-SQRT * shft9(a[ 9] - a[13]); a[ 9] += a[13]; a[13] = xr - a[ 9]; 1829 1829 xr =-SQRT * shft9(a[25] - a[29]); a[25] += a[29]; a[29] = xr - a[25]; 1830 1830 xr =-SQRT * shft9(a[24] + a[28]); a[24] -= a[28]; a[28] = xr - a[24]; 1831 - 1831 + 1832 1832 xr = a[24] - a[16]; a[24] = xr; 1833 1833 xr = a[20] - xr; a[20] = xr; 1834 1834 xr = a[28] - xr; a[28] = xr; 1835 - 1835 + 1836 1836 xr = a[25] - a[17]; a[25] = xr; 1837 1837 xr = a[21] - xr; a[21] = xr; 1838 1838 xr = a[29] - xr; a[29] = xr; 1839 - 1839 + 1840 1840 xr = a[17] - a[1]; a[17] = xr; 1841 1841 xr = a[ 9] - xr; a[ 9] = xr; 1842 1842 xr = a[25] - xr; a[25] = xr; ··· 1844 1844 xr = a[21] - xr; a[21] = xr; 1845 1845 xr = a[13] - xr; a[13] = xr; 1846 1846 xr = a[29] - xr; a[29] = xr; 1847 - 1847 + 1848 1848 xr = a[ 1] - a[0]; a[ 1] = xr; 1849 1849 xr = a[16] - xr; a[16] = xr; 1850 1850 xr = a[17] - xr; a[17] = xr; ··· 1860 1860 xr = a[13] - xr; a[13] = xr; 1861 1861 xr = a[28] - xr; a[28] = xr; 1862 1862 xr = a[29] - xr; a[29] = xr; 1863 - 1863 + 1864 1864 xr = a[ 0]; a[ 0] += a[31]; a[31] -= xr; 1865 1865 xr = a[ 1]; a[ 1] += a[30]; a[30] -= xr; 1866 1866 xr = a[16]; a[16] += a[15]; a[15] -= xr; ··· 1900 1900 ct = (tc1 - tc3 - tc4) * cx[6]; 1901 1901 out[5] = ct + st; 1902 1902 out[6] = ct - st; 1903 - 1903 + 1904 1904 tc2 = (in[16] - in[10]) * cx[6]; 1905 1905 ts6 = ts6 * cx[7] + in[4] * cx[8]; 1906 1906 ··· 1908 1908 st = -ts5 * cx[4] + ts6 - ts7 * cx[5] + ts8 * cx[3]; 1909 1909 out[1] = ct + st; 1910 1910 out[2] = ct - st; 1911 - 1911 + 1912 1912 ct = tc1 * cx[1] - tc2 - tc3 * cx[2] + tc4 * cx[0]; 1913 1913 st = -ts5 * cx[5] + ts6 - ts7 * cx[3] + ts8 * cx[4]; 1914 1914 out[ 9] = ct + st; 1915 1915 out[10] = ct - st; 1916 - 1916 + 1917 1917 ct = tc1 * cx[2] - tc2 + tc3 * cx[0] - tc4 * cx[1]; 1918 1918 st = ts5 * cx[3] - ts6 + ts7 * cx[4] - ts8 * cx[5]; 1919 1919 out[13] = ct + st; ··· 1966 1966 int mpeg = freq >= (32000+24000)/2 ? 1 : 0; 1967 1967 int i = ci->round_value_to_list32(freq, sampr_index[mpeg], 3, true); 1968 1968 *mp3_type = mpeg; 1969 - return i; 1969 + return i; 1970 1970 } 1971 1971 1972 1972 static bool init_mp3_encoder_engine(int sample_rate, ··· 2523 2523 return; 2524 2524 2525 2525 break; 2526 - 2526 + 2527 2527 case ENC_END_FILE: 2528 2528 if (on_end_file((struct enc_file_event_data *)data)) 2529 2529 return;
+2 -2
lib/rbcodec/codecs/wav_enc.c
··· 40 40 uint16_t block_align; /* 20h - num_channels*bits_per_samples/8 */ 41 41 uint16_t bits_per_sample; /* 22h - 8=8 bits, 16=16 bits, etc. */ 42 42 /* Not for audio_format=1 (PCM) */ 43 - /* unsigned short extra_param_size; 24h - size of extra data */ 43 + /* unsigned short extra_param_size; 24h - size of extra data */ 44 44 /* unsigned char *extra_params; */ 45 45 /* data header */ 46 46 uint8_t data_id[4]; /* 24h - "data" */ ··· 68 68 /* "RIFF" header */ 69 69 { 'R', 'I', 'F', 'F' }, /* riff_id */ 70 70 0, /* riff_size (*) */ 71 - /* format header */ 71 + /* format header */ 72 72 { 'W', 'A', 'V', 'E' }, /* format */ 73 73 { 'f', 'm', 't', ' ' }, /* format_id */ 74 74 htole32(16), /* format_size */
+4 -4
lib/rbcodec/codecs/wavpack_enc.c
··· 47 47 uint16_t block_align; /* 20h - num_channels*bits_per_samples/8 */ 48 48 uint16_t bits_per_sample; /* 22h - 8=8 bits, 16=16 bits, etc. */ 49 49 /* Not for audio_format=1 (PCM) */ 50 - /* unsigned short extra_param_size; 24h - size of extra data */ 50 + /* unsigned short extra_param_size; 24h - size of extra data */ 51 51 /* unsigned char *extra_params; */ 52 52 /* data header */ 53 53 uint8_t data_id[4]; /* 24h - "data" */ ··· 82 82 /* "RIFF" header */ 83 83 { 'R', 'I', 'F', 'F' }, /* riff_id */ 84 84 0, /* riff_size (*) */ 85 - /* format header */ 85 + /* format header */ 86 86 { 'W', 'A', 'V', 'E' }, /* format */ 87 87 { 'f', 'm', 't', ' ' }, /* format_id */ 88 88 htole32(16), /* format_size */ ··· 234 234 data->num_pcm_samples = 0; 235 235 236 236 /* write template headers */ 237 - if (ci->write(data->rec_file, &wvpk_mdh, sizeof (wvpk_mdh)) 237 + if (ci->write(data->rec_file, &wvpk_mdh, sizeof (wvpk_mdh)) 238 238 != sizeof (wvpk_mdh) || 239 239 ci->write(data->rec_file, &riff_header, sizeof (riff_header)) 240 240 != sizeof (riff_header)) ··· 344 344 { 345 345 struct enc_inputs inputs; 346 346 struct enc_parameters params; 347 - 347 + 348 348 codec_init(); 349 349 350 350 if (ci->enc_get_inputs == NULL ||