├── .gitignore ├── .gitmodules ├── LICENSE ├── README.md ├── components ├── audio │ ├── aplay.c │ ├── component.mk │ └── include │ │ ├── aplay.h │ │ └── audio.h ├── bsp │ ├── component.mk │ ├── include │ │ ├── mpu6050.h │ │ └── wm8978.h │ ├── mpu6050.c │ └── wm8978.c ├── bt_speaker │ ├── bt_app_av.c │ ├── bt_app_core.c │ ├── bt_speaker.c │ ├── component.mk │ └── include │ │ ├── bt_app_av.h │ │ ├── bt_app_core.h │ │ └── bt_speaker.h ├── espressif │ ├── .tags │ ├── .tags_sorted_by_file │ ├── component.mk │ ├── eth.c │ ├── event.c │ ├── include │ │ ├── eth.h │ │ ├── event.h │ │ └── wifi.h │ └── wifi.c ├── euler │ ├── component.mk │ ├── euler.c │ ├── imuUpdate.c │ └── include │ │ ├── euler.h │ │ └── imuUpdate.h ├── fifo │ ├── component.mk │ ├── include │ │ ├── spiram.h │ │ └── spiram_fifo.h │ └── spiram_fifo.c ├── ftp │ ├── component.mk │ ├── ftpd.c │ └── include │ │ └── ftpd.h ├── hal │ ├── component.mk │ ├── hal_eth.c │ ├── hal_i2c.c │ ├── hal_i2s.c │ ├── hal_tim.c │ └── include │ │ ├── hal_eth.h │ │ ├── hal_i2c.h │ │ ├── hal_i2s.h │ │ └── hal_tim.h ├── helix │ ├── component.mk │ ├── example.c │ ├── include │ │ ├── assembly.h │ │ ├── coder.h │ │ ├── mp3common.h │ │ ├── mp3dec.h │ │ ├── mpadecobjfixpt.h │ │ └── statname.h │ └── src │ │ ├── bitstream.c │ │ ├── buffers.c │ │ ├── dct32.c │ │ ├── dequant.c │ │ ├── dqchan.c │ │ ├── huffman.c │ │ ├── hufftabs.c │ │ ├── imdct.c │ │ ├── mp3dec.c │ │ ├── mp3tabs.c │ │ ├── polyphase.c │ │ ├── scalfact.c │ │ ├── stproc.c │ │ ├── subband.c │ │ └── trigtabs.c ├── http │ ├── component.mk │ ├── http.c │ ├── include │ │ ├── http.h │ │ └── url_parser.h │ └── url_parser.c ├── liblame │ ├── component.mk │ ├── include │ │ ├── VbrTag.h │ │ ├── bitstream.h │ │ ├── config.h │ │ ├── encoder.h │ │ ├── fft.h │ │ ├── gain_analysis.h │ │ ├── id3tag.h │ │ ├── l3side.h │ │ ├── lame-analysis.h │ │ ├── lame.h │ │ ├── lame_global_flags.h │ │ ├── lame_intrin.h │ │ ├── lameerror.h │ │ ├── machine.h │ │ ├── newmdct.h │ │ ├── psymodel.h │ │ ├── quantize.h │ │ ├── quantize_pvt.h │ │ ├── reservoir.h │ │ ├── set_get.h │ │ ├── tables.h │ │ ├── util.h │ │ ├── vbrquantize.h │ │ └── version.h │ └── library │ │ ├── COPYING │ │ ├── LICENSE │ │ ├── VbrTag.c │ │ ├── bitstream.c │ │ ├── encoder.c │ │ ├── fft.c │ │ ├── gain_analysis.c │ │ ├── id3tag.c │ │ ├── lame.c │ │ ├── mpglib_interface.c │ │ ├── newmdct.c │ │ ├── presets.c │ │ ├── psymodel.c │ │ ├── quantize.c │ │ ├── quantize_pvt.c │ │ ├── reservoir.c │ │ ├── set_get.c │ │ ├── tables.c │ │ ├── takehiro.c │ │ ├── util.c │ │ ├── vbrquantize.c │ │ ├── vector │ │ ├── lame_intrin.h │ │ └── xmm_quantize_sub.c │ │ ├── version.c │ │ └── xmm_quantize_sub.c ├── libmdns │ ├── component.mk │ ├── include │ │ └── mdns_task.h │ └── mdns_task.c ├── mad │ ├── D.dat │ ├── Makefile │ ├── align.c │ ├── bit.c │ ├── component.mk │ ├── decoder.c │ ├── fixed.c │ ├── frame.c │ ├── huffman.c │ ├── imdct_s.dat │ ├── include │ │ ├── align.h │ │ ├── bit.h │ │ ├── config.h │ │ ├── decoder.h │ │ ├── fixed.h │ │ ├── frame.h │ │ ├── global.h │ │ ├── huffman.h │ │ ├── layer3.h │ │ ├── mad.h │ │ ├── stream.h │ │ ├── synth.h │ │ ├── timer.h │ │ └── version.h │ ├── layer3.c │ ├── mpg12 │ │ ├── layer12.c │ │ ├── layer12.h │ │ └── readme.txt │ ├── qc_table.dat │ ├── rq_table.dat │ ├── sf_table.dat │ ├── stream.c │ ├── synth.c │ ├── synth_stereo.c.unused │ ├── timer.c │ └── version.c ├── speex │ ├── AUTHORS │ ├── COPYING │ ├── ChangeLog │ ├── INSTALL │ ├── Makefile.am │ ├── Makefile.in │ ├── NEWS │ ├── README │ ├── README.TI-DSP │ ├── README.blackfin │ ├── README.symbian │ ├── Speex.kdevelop │ ├── Speex.spec │ ├── Speex.spec.in │ ├── TODO │ ├── aclocal.m4 │ ├── compile │ ├── component.mk │ ├── config.guess │ ├── config.h.in │ ├── config.sub │ ├── configure │ ├── configure.ac │ ├── depcomp │ ├── doc │ │ ├── Makefile.am │ │ ├── Makefile.in │ │ └── manual.pdf │ ├── include │ │ ├── Makefile.am │ │ ├── Makefile.in │ │ ├── config.h │ │ └── speex │ │ │ ├── Makefile.am │ │ │ ├── Makefile.in │ │ │ ├── speex.h │ │ │ ├── speex_bits.h │ │ │ ├── speex_callbacks.h │ │ │ ├── speex_config_types.h │ │ │ ├── speex_header.h │ │ │ ├── speex_stereo.h │ │ │ └── speex_types.h │ ├── install-sh │ ├── libspeex │ │ ├── Makefile.am │ │ ├── Makefile.in │ │ ├── _kiss_fft_guts.h │ │ ├── arch.h │ │ ├── bfin.h │ │ ├── bits.c │ │ ├── cb_search.c │ │ ├── cb_search.h │ │ ├── cb_search_arm4.h │ │ ├── cb_search_bfin.h │ │ ├── cb_search_sse.h │ │ ├── exc_10_16_table.c │ │ ├── exc_10_32_table.c │ │ ├── exc_20_32_table.c │ │ ├── exc_5_256_table.c │ │ ├── exc_5_64_table.c │ │ ├── exc_8_128_table.c │ │ ├── fftwrap.h │ │ ├── filters.c │ │ ├── filters.h │ │ ├── filters_arm4.h │ │ ├── filters_bfin.h │ │ ├── filters_sse.h │ │ ├── fixed_arm4.h │ │ ├── fixed_arm5e.h │ │ ├── fixed_bfin.h │ │ ├── fixed_debug.h │ │ ├── fixed_generic.h │ │ ├── gain_table.c │ │ ├── gain_table_lbr.c │ │ ├── hexc_10_32_table.c │ │ ├── hexc_table.c │ │ ├── high_lsp_tables.c │ │ ├── kiss_fft.c │ │ ├── kiss_fft.h │ │ ├── kiss_fftr.c │ │ ├── kiss_fftr.h │ │ ├── lpc.c │ │ ├── lpc.h │ │ ├── lpc_bfin.h │ │ ├── lsp.c │ │ ├── lsp.h │ │ ├── lsp_bfin.h │ │ ├── lsp_tables_nb.c │ │ ├── ltp.c │ │ ├── ltp.h │ │ ├── ltp_arm4.h │ │ ├── ltp_bfin.h │ │ ├── ltp_sse.h │ │ ├── math_approx.h │ │ ├── misc_bfin.h │ │ ├── modes.c │ │ ├── modes.h │ │ ├── modes_wb.c │ │ ├── nb_celp.c │ │ ├── nb_celp.h │ │ ├── os_support.h │ │ ├── quant_lsp.c │ │ ├── quant_lsp.h │ │ ├── quant_lsp_bfin.h │ │ ├── sb_celp.c │ │ ├── sb_celp.h │ │ ├── smallft.c │ │ ├── smallft.h │ │ ├── speex.c │ │ ├── speex_callbacks.c │ │ ├── speex_header.c │ │ ├── stack_alloc.h │ │ ├── stereo.c │ │ ├── testenc.c │ │ ├── testenc_uwb.c │ │ ├── testenc_wb.c │ │ ├── vbr.c │ │ ├── vbr.h │ │ ├── vorbis_psy.c │ │ ├── vorbis_psy.h │ │ ├── vq.c │ │ ├── vq.h │ │ ├── vq_arm4.h │ │ ├── vq_bfin.h │ │ ├── vq_sse.h │ │ └── window.c │ ├── ltmain.sh │ ├── m4 │ │ ├── add_cflags.m4 │ │ ├── libtool.m4 │ │ ├── ltoptions.m4 │ │ ├── ltsugar.m4 │ │ ├── ltversion.m4 │ │ ├── lt~obsolete.m4 │ │ └── pkg.m4 │ ├── missing │ ├── speex.m4 │ ├── speex.pc.in │ ├── symbian │ │ ├── Makefile.am │ │ ├── Makefile.in │ │ ├── bld.inf │ │ ├── config.h │ │ └── speex.mmp │ ├── ti │ │ ├── Makefile.am │ │ ├── Makefile.in │ │ ├── config.h │ │ ├── os_support_custom.h │ │ ├── speex_C54_test │ │ │ ├── Makefile.am │ │ │ ├── Makefile.in │ │ │ ├── speex_C54_test.cmd │ │ │ └── speex_C54_test.pjt │ │ ├── speex_C55_test │ │ │ ├── Makefile.am │ │ │ ├── Makefile.in │ │ │ ├── speex_C55_test.cmd │ │ │ └── speex_C55_test.pjt │ │ ├── speex_C64_test │ │ │ ├── Makefile.am │ │ │ ├── Makefile.in │ │ │ ├── speex_C64_test.cmd │ │ │ └── speex_C64_test.pjt │ │ ├── testenc-TI-C5x.c │ │ └── testenc-TI-C64x.c │ └── win32 │ │ ├── Makefile.am │ │ ├── Makefile.in │ │ ├── VS2003 │ │ ├── Makefile.am │ │ ├── Makefile.in │ │ ├── libspeex.sln │ │ ├── libspeex │ │ │ ├── Makefile.am │ │ │ ├── Makefile.in │ │ │ └── libspeex.vcproj │ │ ├── speexdec │ │ │ ├── Makefile.am │ │ │ ├── Makefile.in │ │ │ └── speexdec.vcproj │ │ ├── speexenc │ │ │ ├── Makefile.am │ │ │ ├── Makefile.in │ │ │ └── speexenc.vcproj │ │ └── tests │ │ │ ├── Makefile.am │ │ │ ├── Makefile.in │ │ │ ├── testenc.vcproj │ │ │ ├── testenc_uwb.vcproj │ │ │ └── testenc_wb.vcproj │ │ ├── VS2005 │ │ ├── Makefile.am │ │ ├── Makefile.in │ │ ├── libspeex.sln │ │ ├── libspeex │ │ │ ├── Makefile.am │ │ │ ├── Makefile.in │ │ │ └── libspeex.vcproj │ │ ├── speexdec │ │ │ ├── Makefile.am │ │ │ ├── Makefile.in │ │ │ └── speexdec.vcproj │ │ ├── speexenc │ │ │ ├── Makefile.am │ │ │ ├── Makefile.in │ │ │ └── speexenc.vcproj │ │ └── tests │ │ │ ├── Makefile.am │ │ │ ├── Makefile.in │ │ │ ├── testenc.vcproj │ │ │ ├── testenc_uwb.vcproj │ │ │ └── testenc_wb.vcproj │ │ ├── VS2008 │ │ ├── Makefile.am │ │ ├── Makefile.in │ │ ├── libspeex.sln │ │ ├── libspeex │ │ │ ├── Makefile.am │ │ │ ├── Makefile.in │ │ │ └── libspeex.vcproj │ │ ├── speexdec │ │ │ ├── Makefile.am │ │ │ ├── Makefile.in │ │ │ └── speexdec.vcproj │ │ ├── speexenc │ │ │ ├── Makefile.am │ │ │ ├── Makefile.in │ │ │ └── speexenc.vcproj │ │ └── tests │ │ │ ├── Makefile.am │ │ │ ├── Makefile.in │ │ │ ├── testenc.vcproj │ │ │ ├── testenc_uwb.vcproj │ │ │ └── testenc_wb.vcproj │ │ ├── config.h │ │ ├── libspeex.def │ │ ├── libspeex │ │ ├── Makefile.am │ │ ├── Makefile.in │ │ ├── libspeex.dsp │ │ ├── libspeex.dsw │ │ └── libspeex_dynamic.dsp │ │ ├── speex.iss │ │ ├── speexdec │ │ ├── Makefile.am │ │ ├── Makefile.in │ │ ├── speexdec.dsp │ │ └── speexdec.dsw │ │ └── speexenc │ │ ├── Makefile.am │ │ ├── Makefile.in │ │ ├── speexenc.dsp │ │ └── speexenc.dsw ├── webserver │ ├── component.mk │ ├── include │ │ └── webserver.h │ └── webserver.c └── websocket │ ├── component.mk │ ├── include │ └── websocket.h │ └── websocket.c ├── example ├── 3d_show │ ├── .gitignore │ ├── 3d_show.html │ ├── Makefile │ ├── README.md │ ├── main │ │ ├── component.mk │ │ └── main.c │ └── sdkconfig ├── audio_play │ ├── .gitignore │ ├── Makefile │ ├── main │ │ ├── Kconfig.projbuild │ │ ├── component.mk │ │ └── main.c │ └── sdkconfig ├── bt_speaker │ ├── .gitignore │ ├── Makefile │ ├── main │ │ ├── component.mk │ │ └── main.c │ └── sdkconfig ├── ftp_server │ ├── .gitignore │ ├── Makefile │ ├── main │ │ ├── component.mk │ │ └── main.c │ └── sdkconfig ├── lame_encode │ ├── .gitignore │ ├── Makefile │ ├── Sample16kHz.raw │ ├── main │ │ ├── component.mk │ │ └── main.c │ └── sdkconfig ├── speex │ ├── .gitignore │ ├── Makefile │ ├── README.md │ ├── main │ │ ├── component.mk │ │ └── main.c │ ├── rawpcm.wav │ └── sdkconfig ├── web_radio │ ├── .gitignore │ ├── Makefile │ ├── main │ │ ├── component.mk │ │ ├── include │ │ │ ├── mp3_decode.h │ │ │ └── web_radio.h │ │ ├── main.c │ │ ├── mp3_decode.c │ │ └── web_radio.c │ └── sdkconfig └── web_server │ ├── .gitignore │ ├── Makefile │ ├── main │ ├── component.mk │ └── main.c │ └── sdkconfig └── www ├── index.html └── static ├── esp32.png └── logo.png /.gitignore: -------------------------------------------------------------------------------- 1 | build/ 2 | sdkconfig.old 3 | -------------------------------------------------------------------------------- /.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "components/espmqtt"] 2 | path = components/espmqtt 3 | url = https://github.com/tuanpmt/espmqtt.git 4 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | [WhyEngineer](https://www.whyengineer.com) ESP32 SNOW 2 | ==== 3 | 4 | # HardWare: 5 | ![esp32_snow](https://img.whyengineer.com/esp32_snow.png?imageView2/2/w/400/h/400/q/75|imageslim) 6 | 7 | * CPU:Xtensa Dual-core 32-bit LX6 microprocessor(s),up to 600 DMIPS 8 | * RAM:4MB(external)+520K(internal) 9 | * ROM:4MB(external)+448(internal) 10 | * WM8978:mclk from gpio0,48k 32bit 2channel 11 | * MPU6050:3-Axi accle and 3-Axi gyro 12 | * BQ24075:Li-ion Charge and power path manage 13 | * Expand all gpio 14 | 15 | # SoftWare Component: 16 | * a based bsp 17 | * a webserver framework(it's easy to use) 18 | * a websocket-server 19 | * mp3 deocde(helix and mad) 20 | * lightweight http client 21 | * a simple PI(D) algorithm to fuison accel and gyro to euler and quaternion 22 | ## ftp-server(about sd card) 23 | ![ftp_server](https://img.whyengineer.com/data/ftp_test.png?imageView2/2/w/800/h/800/q/75|imageslim) 24 | 25 | # Demo: 26 | * webradio 27 | * bluetooth audio 28 | * webcontrol 29 | * baidu_rest_api_rsa 30 | * ble gateway 31 | * 3d show and control 32 | 33 | # Build: 34 | 1. git clone https://github.com/espressif/esp-idf.git 35 | 2. git checkout release/v3.0 36 | 3. git submodule init 37 | 4. git submoudle update 38 | 5. git clone https://github.com/whyengineer/esp32_snow.git 39 | 6. cd esp32_snow/example 40 | 7. chose a demo and compile,if failed you can try rm the build dir and build again. 41 | 42 | # Todo List: 43 | 44 | * a perfect project config(use make menuconfig) 45 | * apple home assistant 46 | * such as qplay protocol 47 | * other funning things. 48 | 49 | -------------------------------------------------------------------------------- /components/audio/component.mk: -------------------------------------------------------------------------------- 1 | # 2 | # Main component makefile. 3 | # 4 | # This Makefile can be left empty. By default, it will take the sources in the 5 | # src/ directory, compile them and link them into lib(subdirectory_name).a 6 | # in the build directory. This behaviour is entirely configurable, 7 | # please read the ESP-IDF documents if you need to do this. 8 | # 9 | 10 | -------------------------------------------------------------------------------- /components/audio/include/aplay.h: -------------------------------------------------------------------------------- 1 | #ifndef PLAY_H 2 | #define PLAY_H 3 | 4 | typedef struct 5 | { 6 | char rld[4]; //riff 标志符号 7 | int rLen; // 8 | char wld[4]; //格式类型(wave) 9 | char fld[4]; //"fmt" 10 | 11 | int fLen; //sizeof(wave format matex) 12 | 13 | short wFormatTag; //编码格式 14 | short wChannels; //声道数 15 | int nSamplesPersec; //采样频率 16 | int nAvgBitsPerSample;//WAVE文件采样大小 17 | short wBlockAlign; //块对齐 18 | short wBitsPerSample; //WAVE文件采样大小 19 | 20 | char dld[4]; //”data“ 21 | int wSampleLength; //音频数据的大小 22 | }WAV_HEADER; 23 | 24 | void aplay_wav(char* filename); 25 | void aplay_mp3(char* filename); 26 | 27 | #endif 28 | 29 | -------------------------------------------------------------------------------- /components/audio/include/audio.h: -------------------------------------------------------------------------------- 1 | #ifndef AUDIO_H 2 | #define AUDIO_H 3 | 4 | 5 | 6 | 7 | void audiostream_task( void *pvParameters ); 8 | 9 | 10 | 11 | #endif 12 | 13 | -------------------------------------------------------------------------------- /components/bsp/component.mk: -------------------------------------------------------------------------------- 1 | # 2 | # Main component makefile. 3 | # 4 | # This Makefile can be left empty. By default, it will take the sources in the 5 | # src/ directory, compile them and link them into lib(subdirectory_name).a 6 | # in the build directory. This behaviour is entirely configurable, 7 | # please read the ESP-IDF documents if you need to do this. 8 | # 9 | -------------------------------------------------------------------------------- /components/bt_speaker/component.mk: -------------------------------------------------------------------------------- 1 | # 2 | # "main" pseudo-component makefile. 3 | # 4 | # (Uses default behaviour of compiling all source files in directory, adding 'include' to include path.) 5 | 6 | ifdef CONFIG_BT_ENABLED 7 | CFLAGS+=-DCONFIG_BT_ENABLED 8 | COMPONENT_OBJS:=bt_app_av.o bt_app_core.o bt_speaker.o 9 | endif -------------------------------------------------------------------------------- /components/bt_speaker/include/bt_app_av.h: -------------------------------------------------------------------------------- 1 | // Copyright 2015-2016 Espressif Systems (Shanghai) PTE LTD 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | 15 | #ifndef __BT_APP_AV_H__ 16 | #define __BT_APP_AV_H__ 17 | 18 | #include 19 | #include "esp_a2dp_api.h" 20 | #include "esp_avrc_api.h" 21 | 22 | #define BT_AV_TAG "BT_AV" 23 | 24 | /** 25 | * @brief callback function for A2DP sink 26 | */ 27 | void bt_app_a2d_cb(esp_a2d_cb_event_t event, esp_a2d_cb_param_t *param); 28 | 29 | /** 30 | * @brief callback function for A2DP sink audio data stream 31 | */ 32 | void bt_app_a2d_data_cb(const uint8_t *data, uint32_t len); 33 | 34 | /** 35 | * @brief callback function for AVRCP controller 36 | */ 37 | void bt_app_rc_ct_cb(esp_avrc_ct_cb_event_t event, esp_avrc_ct_cb_param_t *param); 38 | 39 | #endif /* __BT_APP_AV_H__*/ 40 | -------------------------------------------------------------------------------- /components/bt_speaker/include/bt_app_core.h: -------------------------------------------------------------------------------- 1 | // Copyright 2015-2016 Espressif Systems (Shanghai) PTE LTD 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | 15 | #ifndef __BT_APP_CORE_H__ 16 | #define __BT_APP_CORE_H__ 17 | 18 | #include 19 | #include 20 | #include 21 | 22 | #define BT_APP_CORE_TAG "BT_APP_CORE" 23 | 24 | #define BT_APP_SIG_WORK_DISPATCH (0x01) 25 | 26 | /** 27 | * @brief handler for the dispatched work 28 | */ 29 | typedef void (* bt_app_cb_t) (uint16_t event, void *param); 30 | 31 | /* message to be sent */ 32 | typedef struct { 33 | uint16_t sig; /*!< signal to bt_app_task */ 34 | uint16_t event; /*!< message event id */ 35 | bt_app_cb_t cb; /*!< context switch callback */ 36 | void *param; /*!< parameter area needs to be last */ 37 | } bt_app_msg_t; 38 | 39 | /** 40 | * @brief parameter deep-copy function to be customized 41 | */ 42 | typedef void (* bt_app_copy_cb_t) (bt_app_msg_t *msg, void *p_dest, void *p_src); 43 | 44 | /** 45 | * @brief work dispatcher for the application task 46 | */ 47 | bool bt_app_work_dispatch(bt_app_cb_t p_cback, uint16_t event, void *p_params, int param_len, bt_app_copy_cb_t p_copy_cback); 48 | 49 | void bt_app_task_start_up(void); 50 | 51 | void bt_app_task_shut_down(void); 52 | 53 | #endif /* __BT_APP_CORE_H__ */ 54 | -------------------------------------------------------------------------------- /components/bt_speaker/include/bt_speaker.h: -------------------------------------------------------------------------------- 1 | #ifndef _INCLUDE_BT_SPEAKER_H_ 2 | #define _INCLUDE_BT_SPEAKER_H_ 3 | 4 | void bt_speaker_start(); 5 | 6 | #endif /* _INCLUDE_BT_SPEAKER_H_ */ -------------------------------------------------------------------------------- /components/espressif/.tags: -------------------------------------------------------------------------------- 1 | !_TAG_FILE_FORMAT 2 /extended format; --format=1 will not append ;" to lines/ 2 | !_TAG_FILE_SORTED 1 /0=unsorted, 1=sorted, 2=foldcase/ 3 | !_TAG_PROGRAM_AUTHOR Darren Hiebert /dhiebert@users.sourceforge.net/ 4 | !_TAG_PROGRAM_NAME Exuberant Ctags // 5 | !_TAG_PROGRAM_URL http://ctags.sourceforge.net /official site/ 6 | !_TAG_PROGRAM_VERSION 5.9~svn20110310 // 7 | DEFAULT_ETHERNET_PHY_CONFIG eth.c 25;" d file: 8 | ETH_CONNECTED_BIT include/event.h 12;" d 9 | ETH_GOTIP_BIT include/event.h 13;" d 10 | EXAMPLE_DEFAULT_PWD wifi.c 17;" d file: 11 | EXAMPLE_DEFAULT_SSID wifi.c 16;" d file: 12 | EXAMPLE_MAX_STA_CONN wifi.c 19;" d file: 13 | PIN_SMI_MDC eth.c 27;" d file: 14 | PIN_SMI_MDIO eth.c 28;" d file: 15 | STA_CONNECTED_BIT include/event.h 9;" d 16 | STA_GOTIP_BIT include/event.h 10;" d 17 | _ETH_H include/eth.h 2;" d 18 | _EVENT_H include/event.h 2;" d 19 | _WIFI_H include/wifi.h 2;" d 20 | ap_event_group event.c /^EventGroupHandle_t ap_event_group;\/\/24bit$/;" v 21 | eth_event_group event.c /^EventGroupHandle_t eth_event_group;\/\/24bit$/;" v 22 | eth_gpio_config_rmii eth.c /^static void eth_gpio_config_rmii(void)$/;" f file: 23 | eth_init eth.c /^void eth_init(){$/;" f 24 | event_engine_init event.c /^void event_engine_init(){$/;" f 25 | event_handler event.c /^static esp_err_t event_handler(void *ctx, system_event_t *event)$/;" f file: 26 | station_event_group event.c /^EventGroupHandle_t station_event_group;\/\/24bit$/;" v 27 | wifi_init_softap wifi.c /^void wifi_init_softap()$/;" f 28 | wifi_init_sta wifi.c /^void wifi_init_sta()$/;" f 29 | -------------------------------------------------------------------------------- /components/espressif/.tags_sorted_by_file: -------------------------------------------------------------------------------- 1 | !_TAG_FILE_SORTED 1 /0=unsorted, 1=sorted, 2=foldcase/ 2 | !_TAG_FILE_FORMAT 2 /extended format; --format=1 will not append ;" to lines/ 3 | !_TAG_PROGRAM_VERSION 5.9~svn20110310 // 4 | !_TAG_PROGRAM_AUTHOR Darren Hiebert /dhiebert@users.sourceforge.net/ 5 | !_TAG_PROGRAM_NAME Exuberant Ctags // 6 | DEFAULT_ETHERNET_PHY_CONFIG eth.c 25;" d file: 7 | PIN_SMI_MDC eth.c 27;" d file: 8 | PIN_SMI_MDIO eth.c 28;" d file: 9 | eth_gpio_config_rmii eth.c /^static void eth_gpio_config_rmii(void)$/;" f file: 10 | eth_init eth.c /^void eth_init(){$/;" f 11 | ap_event_group event.c /^EventGroupHandle_t ap_event_group;\/\/24bit$/;" v 12 | eth_event_group event.c /^EventGroupHandle_t eth_event_group;\/\/24bit$/;" v 13 | event_engine_init event.c /^void event_engine_init(){$/;" f 14 | event_handler event.c /^static esp_err_t event_handler(void *ctx, system_event_t *event)$/;" f file: 15 | station_event_group event.c /^EventGroupHandle_t station_event_group;\/\/24bit$/;" v 16 | !_TAG_PROGRAM_URL http://ctags.sourceforge.net /official site/ 17 | _ETH_H include/eth.h 2;" d 18 | ETH_CONNECTED_BIT include/event.h 12;" d 19 | ETH_GOTIP_BIT include/event.h 13;" d 20 | STA_CONNECTED_BIT include/event.h 9;" d 21 | STA_GOTIP_BIT include/event.h 10;" d 22 | _EVENT_H include/event.h 2;" d 23 | _WIFI_H include/wifi.h 2;" d 24 | EXAMPLE_DEFAULT_PWD wifi.c 17;" d file: 25 | EXAMPLE_DEFAULT_SSID wifi.c 16;" d file: 26 | EXAMPLE_MAX_STA_CONN wifi.c 19;" d file: 27 | wifi_init_softap wifi.c /^void wifi_init_softap()$/;" f 28 | wifi_init_sta wifi.c /^void wifi_init_sta()$/;" f 29 | -------------------------------------------------------------------------------- /components/espressif/component.mk: -------------------------------------------------------------------------------- 1 | # 2 | # Main component makefile. 3 | # 4 | # This Makefile can be left empty. By default, it will take the sources in the 5 | # src/ directory, compile them and link them into lib(subdirectory_name).a 6 | # in the build directory. This behaviour is entirely configurable, 7 | # please read the ESP-IDF documents if you need to do this. 8 | # 9 | 10 | -------------------------------------------------------------------------------- /components/espressif/eth.c: -------------------------------------------------------------------------------- 1 | 2 | #include "esp_system.h" 3 | #include "esp_err.h" 4 | #include "esp_event_loop.h" 5 | #include "esp_event.h" 6 | #include "esp_attr.h" 7 | #include "esp_log.h" 8 | #include "esp_eth.h" 9 | 10 | #include "rom/ets_sys.h" 11 | #include "rom/gpio.h" 12 | 13 | #include "soc/dport_reg.h" 14 | #include "soc/io_mux_reg.h" 15 | #include "soc/rtc_cntl_reg.h" 16 | #include "soc/gpio_reg.h" 17 | #include "soc/gpio_sig_map.h" 18 | 19 | #include "nvs_flash.h" 20 | #include "driver/gpio.h" 21 | 22 | #include "eth_phy/phy_lan8720.h" 23 | #include "eth.h" 24 | #include "event.h" 25 | 26 | 27 | 28 | 29 | #define DEFAULT_ETHERNET_PHY_CONFIG phy_lan8720_default_ethernet_config 30 | 31 | #define PIN_SMI_MDC GPIO_NUM_23 32 | #define PIN_SMI_MDIO GPIO_NUM_18 33 | 34 | static void eth_gpio_config_rmii(void) 35 | { 36 | // RMII data pins are fixed: 37 | // TXD0 = GPIO19 38 | // TXD1 = GPIO22 39 | // TX_EN = GPIO21 40 | // RXD0 = GPIO25 41 | // RXD1 = GPIO26 42 | // CLK == GPIO0 43 | phy_rmii_configure_data_interface_pins(); 44 | // MDC is GPIO 23, MDIO is GPIO 18 45 | phy_rmii_smi_configure_pins(PIN_SMI_MDC, PIN_SMI_MDIO); 46 | } 47 | void eth_init(){ 48 | eth_event_group = xEventGroupCreate(); 49 | esp_err_t ret = ESP_OK; 50 | //tcpip_adapter_init(); 51 | //esp_event_loop_init(NULL, NULL); 52 | 53 | eth_config_t config = DEFAULT_ETHERNET_PHY_CONFIG; 54 | /* Set the PHY address in the example configuration */ 55 | config.phy_addr = 0; 56 | config.gpio_config = eth_gpio_config_rmii; 57 | config.tcpip_input = tcpip_adapter_eth_input; 58 | 59 | ret = esp_eth_init(&config); 60 | 61 | if(ret == ESP_OK) { 62 | esp_eth_enable(); 63 | } 64 | 65 | } -------------------------------------------------------------------------------- /components/espressif/event.c: -------------------------------------------------------------------------------- 1 | //event engine 2 | #include "event.h" 3 | #include "esp_system.h" 4 | #include "esp_event_loop.h" 5 | #include "esp_log.h" 6 | #include "esp_wifi.h" 7 | 8 | 9 | 10 | #define TAG "event:" 11 | 12 | EventGroupHandle_t station_event_group;//24bit 13 | EventGroupHandle_t ap_event_group;//24bit 14 | EventGroupHandle_t eth_event_group;//24bit 15 | 16 | static esp_err_t event_handler(void *ctx, system_event_t *event) 17 | { 18 | switch(event->event_id) { 19 | case SYSTEM_EVENT_STA_START:// station start 20 | esp_wifi_connect(); 21 | break; 22 | case SYSTEM_EVENT_STA_DISCONNECTED: //station disconnect from ap 23 | esp_wifi_connect(); 24 | xEventGroupClearBits(station_event_group, STA_CONNECTED_BIT); 25 | xEventGroupClearBits(station_event_group, STA_GOTIP_BIT); 26 | break; 27 | case SYSTEM_EVENT_STA_CONNECTED: //station connect to ap 28 | xEventGroupSetBits(station_event_group, STA_CONNECTED_BIT); 29 | break; 30 | case SYSTEM_EVENT_STA_GOT_IP: //station get ip 31 | ESP_LOGI(TAG, "got ip:%s\n", 32 | ip4addr_ntoa(&event->event_info.got_ip.ip_info.ip)); 33 | xEventGroupSetBits(station_event_group, STA_GOTIP_BIT); 34 | break; 35 | case SYSTEM_EVENT_AP_START: 36 | xEventGroupSetBits(ap_event_group, AP_START_BIT); 37 | case SYSTEM_EVENT_AP_STACONNECTED:// a station connect to ap 38 | ESP_LOGI(TAG, "station:"MACSTR" join,AID=%d\n", 39 | MAC2STR(event->event_info.sta_connected.mac), 40 | event->event_info.sta_connected.aid); 41 | //xEventGroupSetBits(tcp_event_group, WIFI_CONNECTED_BIT); 42 | break; 43 | case SYSTEM_EVENT_AP_STADISCONNECTED://a station disconnect from ap 44 | ESP_LOGI(TAG, "station:"MACSTR"leave,AID=%d\n", 45 | MAC2STR(event->event_info.sta_disconnected.mac), 46 | event->event_info.sta_disconnected.aid); 47 | //xEventGroupClearBits(tcp_event_group, WIFI_CONNECTED_BIT); 48 | break; 49 | case SYSTEM_EVENT_ETH_CONNECTED: 50 | xEventGroupSetBits(eth_event_group, ETH_CONNECTED_BIT); 51 | break; 52 | case SYSTEM_EVENT_ETH_DISCONNECTED: 53 | //xEventGroupClearBits(eth_event_group, ETH_CONNECTED_BIT); 54 | //xEventGroupClearBits(eth_event_group, ETH_GOTIP_BIT); 55 | xEventGroupSetBits(eth_event_group, ETH_DISCONNECTED_BIT); 56 | case SYSTEM_EVENT_ETH_GOT_IP: 57 | xEventGroupSetBits(eth_event_group, ETH_GOTIP_BIT); 58 | default: 59 | break; 60 | } 61 | return ESP_OK; 62 | } 63 | 64 | 65 | void event_engine_init(){ 66 | station_event_group = xEventGroupCreate(); 67 | ap_event_group = xEventGroupCreate(); 68 | eth_event_group = xEventGroupCreate(); 69 | esp_event_loop_init(event_handler,NULL); 70 | } 71 | 72 | 73 | -------------------------------------------------------------------------------- /components/espressif/include/eth.h: -------------------------------------------------------------------------------- 1 | #ifndef _ETH_H 2 | #define _ETH_H 3 | 4 | void eth_init(); 5 | 6 | #endif -------------------------------------------------------------------------------- /components/espressif/include/event.h: -------------------------------------------------------------------------------- 1 | #ifndef _EVENT_H 2 | #define _EVENT_H 3 | 4 | 5 | #include "freertos/FreeRTOS.h" 6 | #include "freertos/task.h" 7 | #include "freertos/event_groups.h" 8 | 9 | #define STA_CONNECTED_BIT BIT0 10 | #define STA_GOTIP_BIT BIT1 11 | 12 | #define AP_START_BIT BIT0 13 | 14 | #define ETH_CONNECTED_BIT BIT0 15 | #define ETH_GOTIP_BIT BIT1 16 | #define ETH_DISCONNECTED_BIT BIT2 17 | 18 | extern EventGroupHandle_t station_event_group;//24bit 19 | extern EventGroupHandle_t ap_event_group;//24bit 20 | extern EventGroupHandle_t eth_event_group;//24bit 21 | 22 | 23 | void event_engine_init(); 24 | #endif -------------------------------------------------------------------------------- /components/espressif/include/wifi.h: -------------------------------------------------------------------------------- 1 | #ifndef _WIFI_H 2 | #define _WIFI_H 3 | 4 | void wifi_init_sta(char* ssid,char* pw); 5 | void wifi_init_softap(char* ssid,char* pw); 6 | 7 | #endif -------------------------------------------------------------------------------- /components/espressif/wifi.c: -------------------------------------------------------------------------------- 1 | 2 | 3 | #include 4 | #include 5 | #include "freertos/FreeRTOS.h" 6 | #include "freertos/task.h" 7 | #include "freertos/event_groups.h" 8 | #include "esp_wifi.h" 9 | #include "esp_event_loop.h" 10 | #include "esp_log.h" 11 | 12 | #include "wifi.h" 13 | #include "event.h" 14 | 15 | 16 | #define EXAMPLE_DEFAULT_SSID "esp32" 17 | #define EXAMPLE_DEFAULT_PWD "1234567890" 18 | 19 | #define EXAMPLE_MAX_STA_CONN 3 20 | 21 | #define TAG "wifi:" 22 | 23 | 24 | void wifi_init_sta(char* ssid,char* pw) 25 | { 26 | //station_event_group = xEventGroupCreate(); 27 | 28 | //tcpip_adapter_init(); 29 | 30 | wifi_init_config_t cfg = WIFI_INIT_CONFIG_DEFAULT(); 31 | ESP_ERROR_CHECK(esp_wifi_init(&cfg)); 32 | ESP_ERROR_CHECK( esp_wifi_set_storage(WIFI_STORAGE_FLASH)); 33 | // wifi_config_t wifi_config = { 34 | // .sta = { 35 | // .ssid = ssid, 36 | // .password = pw 37 | // }, 38 | // }; 39 | wifi_config_t wifi_config; 40 | memset(&wifi_config,0,sizeof(wifi_config)); 41 | memcpy(wifi_config.sta.ssid,ssid,strlen(ssid)); 42 | memcpy(wifi_config.sta.password,pw,strlen(pw)); 43 | ESP_ERROR_CHECK(esp_wifi_set_mode(WIFI_MODE_STA) ); 44 | ESP_ERROR_CHECK(esp_wifi_set_config(ESP_IF_WIFI_STA, &wifi_config) ); 45 | ESP_ERROR_CHECK(esp_wifi_start() ); 46 | 47 | ESP_LOGI(TAG, "wifi_init_sta finished."); 48 | ESP_LOGI(TAG, "connect to ap SSID:%s password:%s \n", 49 | ssid,pw); 50 | } 51 | void wifi_init_softap(char* ssid,char* pw) 52 | { 53 | //ap_event_group = xEventGroupCreate(); 54 | 55 | //tcpip_adapter_init(); 56 | 57 | wifi_init_config_t cfg = WIFI_INIT_CONFIG_DEFAULT(); 58 | ESP_ERROR_CHECK(esp_wifi_init(&cfg)); 59 | wifi_config_t wifi_config; 60 | memset(&wifi_config,0,sizeof(wifi_config)); 61 | 62 | memcpy(wifi_config.ap.ssid,ssid,strlen(ssid)); 63 | wifi_config.ap.ssid_len=strlen(ssid); 64 | wifi_config.ap.max_connection=EXAMPLE_MAX_STA_CONN; 65 | memcpy(wifi_config.ap.password,pw,strlen(pw)); 66 | wifi_config.ap.authmode=WIFI_AUTH_WPA_WPA2_PSK; 67 | // wifi_config_t wifi_config = { 68 | // .ap = { 69 | // .ssid = EXAMPLE_DEFAULT_SSID, 70 | // .ssid_len = strlen(EXAMPLE_DEFAULT_SSID), 71 | // .max_connection=EXAMPLE_MAX_STA_CONN, 72 | // .password = EXAMPLE_DEFAULT_PWD, 73 | // .authmode = WIFI_AUTH_WPA_WPA2_PSK 74 | // }, 75 | // }; 76 | // if (strlen(EXAMPLE_DEFAULT_PWD) ==0) { 77 | // wifi_config.ap.authmode = WIFI_AUTH_OPEN; 78 | // } 79 | 80 | ESP_ERROR_CHECK(esp_wifi_set_mode(WIFI_MODE_AP)); 81 | ESP_ERROR_CHECK(esp_wifi_set_config(ESP_IF_WIFI_AP, &wifi_config)); 82 | ESP_ERROR_CHECK(esp_wifi_start()); 83 | 84 | ESP_LOGI(TAG, "wifi_init_softap finished.SSID:%s password:%s \n",\ 85 | ssid, pw); 86 | } -------------------------------------------------------------------------------- /components/euler/component.mk: -------------------------------------------------------------------------------- 1 | # 2 | # Main component makefile. 3 | # 4 | # This Makefile can be left empty. By default, it will take the sources in the 5 | # src/ directory, compile them and link them into lib(subdirectory_name).a 6 | # in the build directory. This behaviour is entirely configurable, 7 | # please read the ESP-IDF documents if you need to do this. 8 | # 9 | -------------------------------------------------------------------------------- /components/euler/include/euler.h: -------------------------------------------------------------------------------- 1 | #ifndef EULER_H 2 | #define EULER_H 3 | 4 | 5 | typedef struct 6 | { 7 | float accel[3]; 8 | float gyro[3]; 9 | float euler[3]; 10 | float q[4]; 11 | }EulerTypeDef; 12 | 13 | void euler_task( void *pvParameters ); 14 | 15 | 16 | 17 | #endif -------------------------------------------------------------------------------- /components/euler/include/imuUpdate.h: -------------------------------------------------------------------------------- 1 | #ifndef IMU_UPDATE_H 2 | #define IMU_UPDATE_H 3 | 4 | 5 | 6 | 7 | void IMUupdate(); 8 | float invSqrt(float x) ; 9 | 10 | 11 | 12 | #endif -------------------------------------------------------------------------------- /components/fifo/component.mk: -------------------------------------------------------------------------------- 1 | # 2 | # Main Makefile. This is basically the same as a component makefile. 3 | # 4 | # This Makefile should, at the very least, just include $(SDK_PATH)/make/component_common.mk. By default, 5 | # this will take the sources in the src/ directory, compile them and link them into 6 | # lib(subdirectory_name).a in the build directory. This behaviour is entirely configurable, 7 | # please read the ESP-IDF documents if you need to do this. 8 | # 9 | 10 | COMPONENT_SRCDIRS := . 11 | 12 | CFLAGS += -Wno-error=unused-label -Wno-error=return-type -Wno-error=missing-braces -Wno-error=pointer-sign -Wno-error=parentheses 13 | 14 | -------------------------------------------------------------------------------- /components/fifo/include/spiram.h: -------------------------------------------------------------------------------- 1 | #ifndef _SPIRAM_H_ 2 | #define _SPIRAM_H_ 3 | 4 | #define SPIRAMSIZE (128*1024) //for a 23LC1024 chip 5 | 6 | 7 | //Define this to use the SPI RAM in QSPI mode. This mode theoretically improves 8 | //the bandwith to the chip four-fold, but it needs all 4 SDIO pins connected. It's 9 | //disabled here because not everyone using the MP3 example will have those pins 10 | //connected and the overall speed increase on the MP3 example is negligable. 11 | //#define SPIRAM_QIO 12 | 13 | 14 | void spiRamInit(); 15 | void spiRamRead(int addr, char *buff, int len); 16 | void spiRamWrite(int addr, char *buff, int len); 17 | int spiRamTest(); 18 | 19 | #endif -------------------------------------------------------------------------------- /components/fifo/include/spiram_fifo.h: -------------------------------------------------------------------------------- 1 | #ifndef _SPIRAM_FIFO_H_ 2 | #define _SPIRAM_FIFO_H_ 3 | 4 | int spiRamFifoInit(); 5 | void spiRamFifoRead(char *buff, int len); 6 | void spiRamFifoWrite(const char *buff, int len); 7 | int spiRamFifoFill(); 8 | int spiRamFifoFree(); 9 | long spiRamGetOverrunCt(); 10 | long spiRamGetUnderrunCt(); 11 | 12 | void spiRamFifoReset(); 13 | int spiRamFifoLen(); 14 | 15 | #endif 16 | -------------------------------------------------------------------------------- /components/ftp/component.mk: -------------------------------------------------------------------------------- 1 | 2 | ifdef CONFIG_FTP_SERVER 3 | COMPONENT_ADD_INCLUDEDIRS := include 4 | COMPONENT_OBJS:=ftpd.o 5 | endif 6 | -------------------------------------------------------------------------------- /components/ftp/include/ftpd.h: -------------------------------------------------------------------------------- 1 | #ifndef FTP_D_H 2 | #define FTP_D_H 3 | 4 | 5 | void ftpd_start(); 6 | 7 | 8 | #endif -------------------------------------------------------------------------------- /components/hal/component.mk: -------------------------------------------------------------------------------- 1 | # 2 | # Main component makefile. 3 | # 4 | # This Makefile can be left empty. By default, it will take the sources in the 5 | # src/ directory, compile them and link them into lib(subdirectory_name).a 6 | # in the build directory. This behaviour is entirely configurable, 7 | # please read the ESP-IDF documents if you need to do this. 8 | # 9 | 10 | -------------------------------------------------------------------------------- /components/hal/hal_eth.c: -------------------------------------------------------------------------------- 1 | //#include "esp_eth.h" 2 | #include "hal_eth.h" 3 | #include "soc/io_mux_reg.h" 4 | #include "eth_phy/phy_lan8720.h" 5 | #include "tcpip_adapter.h" 6 | #include "driver/gpio.h" 7 | #include "esp_system.h" 8 | #include "soc/emac_ex_reg.h" 9 | 10 | #define PIN_SMI_MDC GPIO_NUM_23 11 | #define PIN_SMI_MDIO GPIO_NUM_18 12 | 13 | extern void rtc_plla_ena(bool ena, uint32_t sdm0, uint32_t sdm1, uint32_t sdm2, uint32_t o_div); 14 | 15 | static void eth_gpio_config_rmii() 16 | { 17 | // RMII data pins are fixed: 18 | // TXD0 = GPIO19 19 | // TXD1 = GPIO22 20 | // TX_EN = GPIO21 21 | // RXD0 = GPIO25 22 | // RXD1 = GPIO26 23 | // CLK == GPIO0 24 | //phy_rmii_configure_data_interface_pins(); 25 | PIN_FUNC_SELECT(PERIPHS_IO_MUX_GPIO27_U, FUNC_GPIO27_EMAC_RX_DV); 26 | 27 | // TXD0 to GPIO19 28 | PIN_FUNC_SELECT(PERIPHS_IO_MUX_GPIO19_U, FUNC_GPIO19_EMAC_TXD0); 29 | // TX_EN to GPIO21 30 | PIN_FUNC_SELECT(PERIPHS_IO_MUX_GPIO21_U, FUNC_GPIO21_EMAC_TX_EN); 31 | // TXD1 to GPIO22 32 | PIN_FUNC_SELECT(PERIPHS_IO_MUX_GPIO22_U, FUNC_GPIO22_EMAC_TXD1); 33 | //clk out to GPIO17 34 | PIN_FUNC_SELECT(PERIPHS_IO_MUX_GPIO16_U, FUNC_GPIO16_EMAC_CLK_OUT); 35 | // for rev0 chip: f_out = f_xtal * (sdm2 + 4) / (2 * (o_div + 2)) 36 | // so for 40MHz XTAL, sdm2 = 1 and o_div = 1 will give 50MHz //output 37 | 38 | PIN_FUNC_SELECT(PERIPHS_IO_MUX_GPIO16_U, FUNC_GPIO16_EMAC_CLK_OUT); 39 | // REG_SET_FIELD(EMAC_EX_CLKOUT_CONF_REG, EMAC_EX_CLK_OUT_H_DIV_NUM, 0); 40 | // REG_SET_FIELD(EMAC_EX_CLKOUT_CONF_REG, EMAC_EX_CLK_OUT_DIV_NUM, 0); 41 | // REG_CLR_BIT(EMAC_EX_CLK_CTRL_REG, EMAC_EX_EXT_OSC_EN); 42 | // REG_SET_BIT(EMAC_EX_CLK_CTRL_REG, EMAC_EX_INT_OSC_EN); 43 | // rtc_plla_ena(1, 0, 0, 1, 0); 44 | printf("ok!!!!!"); 45 | // RXD0 to GPIO25 46 | gpio_set_direction(25, GPIO_MODE_INPUT); 47 | // RXD1 to GPIO26 48 | gpio_set_direction(26, GPIO_MODE_INPUT); 49 | phy_rmii_smi_configure_pins(PIN_SMI_MDC, PIN_SMI_MDIO); 50 | } 51 | // static void tcpip_adapter_init(void) 52 | // { 53 | // static bool tcpip_inited = false; 54 | // int ret; 55 | 56 | // if (tcpip_inited == false) { 57 | // tcpip_inited = true; 58 | 59 | // tcpip_init(NULL, NULL); 60 | 61 | // IP4_ADDR(&esp_ip[TCPIP_ADAPTER_IF_AP].ip, 192, 168 , 31, 100); 62 | // IP4_ADDR(&esp_ip[TCPIP_ADAPTER_IF_AP].gw, 192, 168 , 31, 1); 63 | // IP4_ADDR(&esp_ip[TCPIP_ADAPTER_IF_AP].netmask, 255, 255 , 255, 0); 64 | // ret = sys_sem_new(&api_sync_sem, 0); 65 | // if (ERR_OK != ret) { 66 | // ESP_LOGD( "tcpip adatper api sync sem init fail"); 67 | // } 68 | // } 69 | // } 70 | esp_err_t hal_eht_init() 71 | { 72 | esp_err_t ret = ESP_OK; 73 | tcpip_adapter_init(); 74 | 75 | eth_config_t config = phy_lan8720_default_ethernet_config; 76 | //config.mac_mode=ETH_MODE_RMII_INT_50MHZ_CLK; 77 | config.gpio_config = eth_gpio_config_rmii; 78 | config.tcpip_input = tcpip_adapter_eth_input; 79 | 80 | ret = esp_eth_init(&config); 81 | return ret; 82 | } 83 | -------------------------------------------------------------------------------- /components/hal/hal_i2c.c: -------------------------------------------------------------------------------- 1 | #include "hal_i2c.h" 2 | #include "driver/i2c.h" 3 | 4 | #define ACK_CHECK_EN 0x1 /*!< I2C master will check ack from slave*/ 5 | #define ACK_CHECK_DIS 0x0 /*!< I2C master will not check ack from slave */ 6 | #define ACK_VAL 0x0 /*!< I2C ack value */ 7 | #define NACK_VAL 0x1 /*!< I2C nack value */ 8 | 9 | #define I2C_EXAMPLE_MASTER_TX_BUF_DISABLE 0 /*!< I2C master do not need buffer */ 10 | #define I2C_EXAMPLE_MASTER_RX_BUF_DISABLE 0 /*!< I2C master do not need buffer */ 11 | 12 | 13 | void hal_i2c_init(uint8_t port ,uint8_t sda,uint8_t scl) 14 | { 15 | int i2c_master_port = (i2c_port_t)port; 16 | i2c_config_t conf; 17 | conf.mode = I2C_MODE_MASTER; 18 | conf.sda_io_num = sda; 19 | conf.sda_pullup_en = GPIO_PULLDOWN_DISABLE; 20 | conf.scl_io_num = scl; 21 | conf.scl_pullup_en = GPIO_PULLDOWN_DISABLE; 22 | conf.master.clk_speed = 100000; 23 | i2c_param_config(i2c_master_port, &conf); 24 | i2c_driver_install(i2c_master_port, conf.mode, 25 | I2C_EXAMPLE_MASTER_RX_BUF_DISABLE, 26 | I2C_EXAMPLE_MASTER_TX_BUF_DISABLE, 0); 27 | } 28 | esp_err_t hal_i2c_master_mem_write(i2c_port_t i2c_num, uint8_t DevAddr,uint8_t MemAddr,uint8_t* data_wr, size_t size) 29 | { 30 | if (size == 0) { 31 | return ESP_OK; 32 | } 33 | i2c_cmd_handle_t cmd = i2c_cmd_link_create();//a cmd list 34 | i2c_master_start(cmd); 35 | i2c_master_write_byte(cmd, ( DevAddr << 1 ) | I2C_MASTER_WRITE, ACK_CHECK_EN); 36 | i2c_master_write_byte(cmd, MemAddr, ACK_CHECK_EN); 37 | i2c_master_write(cmd, data_wr, size, ACK_CHECK_EN); 38 | i2c_master_stop(cmd); 39 | esp_err_t ret = i2c_master_cmd_begin(i2c_num, cmd, 1000 / portTICK_RATE_MS); 40 | i2c_cmd_link_delete(cmd); 41 | return ret; 42 | } 43 | esp_err_t hal_i2c_master_mem_read(i2c_port_t i2c_num, uint8_t DevAddr,uint8_t MemAddr,uint8_t* data_rd, size_t size) 44 | { 45 | if (size == 0) { 46 | return ESP_OK; 47 | } 48 | i2c_cmd_handle_t cmd = i2c_cmd_link_create();//a cmd list 49 | i2c_master_start(cmd); 50 | i2c_master_write_byte(cmd, ( DevAddr << 1 ) | I2C_MASTER_WRITE, ACK_CHECK_EN); 51 | i2c_master_write_byte(cmd, MemAddr, ACK_CHECK_EN); 52 | i2c_master_start(cmd); 53 | i2c_master_write_byte(cmd, ( DevAddr << 1 ) | I2C_MASTER_READ, ACK_CHECK_EN); 54 | if (size > 1) { 55 | i2c_master_read(cmd, data_rd, size - 1, ACK_VAL); 56 | } 57 | i2c_master_read_byte(cmd, data_rd + size - 1, NACK_VAL); 58 | i2c_master_stop(cmd); 59 | esp_err_t ret = i2c_master_cmd_begin(i2c_num, cmd, 1000 / portTICK_RATE_MS); 60 | i2c_cmd_link_delete(cmd); 61 | return ret; 62 | } 63 | 64 | -------------------------------------------------------------------------------- /components/hal/hal_i2s.c: -------------------------------------------------------------------------------- 1 | #include "freertos/FreeRTOS.h" 2 | #include "driver/i2s.h" 3 | #include "hal_i2s.h" 4 | #include "soc/io_mux_reg.h" 5 | #include "soc/soc.h" 6 | 7 | void hal_i2s_init(uint8_t i2s_num,uint32_t rate,uint8_t bits,uint8_t ch) 8 | { 9 | 10 | i2s_channel_fmt_t chanel; 11 | if(ch==2) 12 | chanel=I2S_CHANNEL_FMT_RIGHT_LEFT; 13 | else 14 | chanel=I2S_CHANNEL_FMT_ONLY_LEFT; 15 | 16 | i2s_config_t i2s_config = { 17 | .mode = I2S_MODE_MASTER | I2S_MODE_TX|I2S_MODE_RX, 18 | .sample_rate = rate, 19 | .bits_per_sample = bits, 20 | .channel_format = chanel, //2-channels 21 | .communication_format = I2S_COMM_FORMAT_I2S | I2S_COMM_FORMAT_I2S_MSB, 22 | .dma_buf_count = 3, 23 | .dma_buf_len = 1024, // 24 | .intr_alloc_flags = ESP_INTR_FLAG_LEVEL1 //Interrupt level 1 25 | }; 26 | i2s_pin_config_t pin_config = { 27 | .bck_io_num = 33, 28 | .ws_io_num = 25, 29 | .data_out_num = 26, 30 | .data_in_num = 27 //Not used 31 | }; 32 | i2s_driver_install(i2s_num, &i2s_config, 0, NULL); 33 | i2s_set_pin(i2s_num, &pin_config); 34 | //clk out 35 | PIN_FUNC_SELECT(PERIPHS_IO_MUX_GPIO0_U, FUNC_GPIO0_CLK_OUT1); 36 | //REG_SET_FIELD(PIN_CTRL, CLK_OUT1, 0) 37 | REG_WRITE(PIN_CTRL, 0xFFFFFFF0);; 38 | //i2s_set_clk(i2s_num, rate, bits, ch); 39 | } 40 | int hal_i2s_read(uint8_t i2s_num,char* dest,size_t size,TickType_t timeout) 41 | { 42 | return i2s_read_bytes(i2s_num, dest, size, timeout); 43 | } 44 | int hal_i2s_write(uint8_t i2s_num,char* dest,size_t size,TickType_t timeout) 45 | { 46 | return i2s_write_bytes(i2s_num, dest, size, timeout); 47 | } 48 | 49 | 50 | 51 | -------------------------------------------------------------------------------- /components/hal/include/hal_eth.h: -------------------------------------------------------------------------------- 1 | #ifndef HAL_ETH_H 2 | #define HAL_ETH_H 3 | 4 | #include "esp_eth.h" 5 | esp_err_t hal_eht_init(); 6 | 7 | #endif -------------------------------------------------------------------------------- /components/hal/include/hal_i2c.h: -------------------------------------------------------------------------------- 1 | #ifndef _HAL_I2C_H 2 | #define _HAL_I2C_H 3 | 4 | #include "driver/i2c.h" 5 | esp_err_t hal_i2c_master_mem_read(i2c_port_t i2c_num, uint8_t DevAddr,uint8_t MemAddr,uint8_t* data_rd, size_t size); 6 | esp_err_t hal_i2c_master_mem_write(i2c_port_t i2c_num, uint8_t DevAddr,uint8_t MemAddr,uint8_t* data_wr, size_t size); 7 | void hal_i2c_init(uint8_t port ,uint8_t sda,uint8_t scl); 8 | 9 | #endif 10 | 11 | -------------------------------------------------------------------------------- /components/hal/include/hal_i2s.h: -------------------------------------------------------------------------------- 1 | #ifndef HAL_I2S_H 2 | #define HAL_I2S_H 3 | 4 | 5 | #include "driver/i2s.h" 6 | 7 | void hal_i2s_init(uint8_t i2s_num,uint32_t rate,uint8_t bits,uint8_t ch); 8 | int hal_i2s_read(uint8_t i2s_num,char* dest,size_t size,TickType_t timeout); 9 | int hal_i2s_write(uint8_t i2s_num,char* dest,size_t size,TickType_t timeout); 10 | #endif 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /components/hal/include/hal_tim.h: -------------------------------------------------------------------------------- 1 | #ifndef HAL_TIM_H 2 | #define HAL_TIM_H 3 | 4 | 5 | 6 | 7 | 8 | 9 | #endif -------------------------------------------------------------------------------- /components/helix/component.mk: -------------------------------------------------------------------------------- 1 | 2 | ifdef CONFIG_AUDIO_HELIX 3 | CFLAGS += -DARM -DCONFIG_AUDIO_HELIX 4 | COMPONENT_ADD_INCLUDEDIRS := include 5 | COMPONENT_SRCDIRS:=src 6 | ./src/subband.o ./src/scalfact.o ./src/dqchan.o ./src/huffman.o: CFLAGS += -Wno-unused-but-set-variable 7 | endif 8 | -------------------------------------------------------------------------------- /components/http/component.mk: -------------------------------------------------------------------------------- 1 | # 2 | # Main component makefile. 3 | # 4 | # This Makefile can be left empty. By default, it will take the sources in the 5 | # src/ directory, compile them and link them into lib(subdirectory_name).a 6 | # in the build directory. This behaviour is entirely configurable, 7 | # please read the ESP-IDF documents if you need to do this. 8 | # 9 | -------------------------------------------------------------------------------- /components/http/include/http.h: -------------------------------------------------------------------------------- 1 | #ifndef _HTTP_H_ 2 | #define _HTTP_H_ 3 | 4 | #include "http_parser.h" 5 | 6 | 7 | 8 | int http_client_get(char *uri, http_parser_settings *callbacks, void *user_data); 9 | int http_client_post(char *uri, http_parser_settings *callbacks, void *user_data,char* post_data); 10 | 11 | #endif -------------------------------------------------------------------------------- /components/http/include/url_parser.h: -------------------------------------------------------------------------------- 1 | /* 2 | * url_parser.h 3 | * 4 | * Created on: 29.03.2017 5 | * Author: michaelboeckling 6 | */ 7 | 8 | #ifndef _URL_PARSER_H_ 9 | #define _URL_PARSER_H_ 10 | 11 | 12 | typedef struct 13 | { 14 | /* The host portion of the |uri|, NULL-terminated */ 15 | char *host; 16 | 17 | /* The schema portion of the |uri|, NULL-terminated */ 18 | char *scheme; 19 | 20 | /* The port portion of the |uri|, or the schema's default port */ 21 | uint16_t port; 22 | 23 | /* The authority portion of the |uri|, NULL-terminated */ 24 | char *authority; 25 | 26 | /* The path portion of the |uri|, including query, NULL-terminated */ 27 | char *path; 28 | 29 | } url_t; 30 | 31 | 32 | url_t *url_parse(char *uri); 33 | 34 | void url_free(url_t *url); 35 | 36 | 37 | #endif /* _URL_PARSER_H_ */ -------------------------------------------------------------------------------- /components/liblame/component.mk: -------------------------------------------------------------------------------- 1 | # 2 | # Component Makefile 3 | # 4 | COMPONENT_ADD_INCLUDEDIRS := include 5 | 6 | COMPONENT_SRCDIRS := library 7 | 8 | CFLAGS += -Wno-unused-function -DHAVE_CONFIG_H 9 | -------------------------------------------------------------------------------- /components/liblame/include/VbrTag.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Xing VBR tagging for LAME. 3 | * 4 | * Copyright (c) 1999 A.L. Faber 5 | * 6 | * This library is free software; you can redistribute it and/or 7 | * modify it under the terms of the GNU Library General Public 8 | * License as published by the Free Software Foundation; either 9 | * version 2 of the License, or (at your option) any later version. 10 | * 11 | * This library is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 | * Library General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU Library General Public 17 | * License along with this library; if not, write to the 18 | * Free Software Foundation, Inc., 59 Temple Place - Suite 330, 19 | * Boston, MA 02111-1307, USA. 20 | */ 21 | 22 | #ifndef LAME_VRBTAG_H 23 | #define LAME_VRBTAG_H 24 | 25 | 26 | /* ----------------------------------------------------------- 27 | * A Vbr header may be present in the ancillary 28 | * data field of the first frame of an mp3 bitstream 29 | * The Vbr header (optionally) contains 30 | * frames total number of audio frames in the bitstream 31 | * bytes total number of bytes in the bitstream 32 | * toc table of contents 33 | 34 | * toc (table of contents) gives seek points 35 | * for random access 36 | * the ith entry determines the seek point for 37 | * i-percent duration 38 | * seek point in bytes = (toc[i]/256.0) * total_bitstream_bytes 39 | * e.g. half duration seek point = (toc[50]/256.0) * total_bitstream_bytes 40 | */ 41 | 42 | 43 | #define FRAMES_FLAG 0x0001 44 | #define BYTES_FLAG 0x0002 45 | #define TOC_FLAG 0x0004 46 | #define VBR_SCALE_FLAG 0x0008 47 | 48 | #define NUMTOCENTRIES 100 49 | 50 | #ifndef lame_internal_flags_defined 51 | #define lame_internal_flags_defined 52 | struct lame_internal_flags; 53 | typedef struct lame_internal_flags lame_internal_flags; 54 | #endif 55 | 56 | 57 | /*structure to receive extracted header */ 58 | /* toc may be NULL*/ 59 | typedef struct { 60 | int h_id; /* from MPEG header, 0=MPEG2, 1=MPEG1 */ 61 | int samprate; /* determined from MPEG header */ 62 | int flags; /* from Vbr header data */ 63 | int frames; /* total bit stream frames from Vbr header data */ 64 | int bytes; /* total bit stream bytes from Vbr header data */ 65 | int vbr_scale; /* encoded vbr scale from Vbr header data */ 66 | unsigned char toc[NUMTOCENTRIES]; /* may be NULL if toc not desired */ 67 | int headersize; /* size of VBR header, in bytes */ 68 | int enc_delay; /* encoder delay */ 69 | int enc_padding; /* encoder paddign added at end of stream */ 70 | } VBRTAGDATA; 71 | 72 | int GetVbrTag(VBRTAGDATA * pTagData, const unsigned char *buf); 73 | 74 | int InitVbrTag(lame_global_flags * gfp); 75 | int PutVbrTag(lame_global_flags const *gfp, FILE * fid); 76 | void AddVbrFrame(lame_internal_flags * gfc); 77 | void UpdateMusicCRC(uint16_t * crc, const unsigned char *buffer, int size); 78 | 79 | #endif 80 | -------------------------------------------------------------------------------- /components/liblame/include/bitstream.h: -------------------------------------------------------------------------------- 1 | /* 2 | * MP3 bitstream Output interface for LAME 3 | * 4 | * Copyright (c) 1999 Takehiro TOMINAGA 5 | * 6 | * This library is free software; you can redistribute it and/or 7 | * modify it under the terms of the GNU Library General Public 8 | * License as published by the Free Software Foundation; either 9 | * version 2 of the License, or (at your option) any later version. 10 | * 11 | * This library is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 | * Library General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU Library General Public 17 | * License along with this library; if not, write to the 18 | * Free Software Foundation, Inc., 59 Temple Place - Suite 330, 19 | * Boston, MA 02111-1307, USA. 20 | */ 21 | 22 | #ifndef LAME_BITSTREAM_H 23 | #define LAME_BITSTREAM_H 24 | 25 | int getframebits(const lame_internal_flags * gfc); 26 | 27 | int format_bitstream(lame_internal_flags * gfc); 28 | 29 | void flush_bitstream(lame_internal_flags * gfc); 30 | void add_dummy_byte(lame_internal_flags * gfc, unsigned char val, unsigned int n); 31 | 32 | int copy_buffer(lame_internal_flags * gfc, unsigned char *buffer, int buffer_size, 33 | int update_crc); 34 | void init_bit_stream_w(lame_internal_flags * gfc); 35 | void CRC_writeheader(lame_internal_flags const *gfc, char *buffer); 36 | int compute_flushbits(const lame_internal_flags * gfp, int *nbytes); 37 | 38 | int get_max_frame_buffer_size_by_constraint(SessionConfig_t const * cfg, int constraint); 39 | 40 | #endif 41 | -------------------------------------------------------------------------------- /components/liblame/include/config.h: -------------------------------------------------------------------------------- 1 | #ifndef LAME_CONFIG_H 2 | #define LAME_CONFIG_H 3 | 4 | /* 1234 = LIL_ENDIAN, 4321 = BIGENDIAN */ 5 | #define BYTEORDER 1234 6 | 7 | /* Define to 1 if you have the `bcopy' function. */ 8 | #define HAVE_BCOPY 1 9 | 10 | /* Define to 1 if you have the header file. */ 11 | #define HAVE_DLFCN_H 1 12 | 13 | /* Define to 1 if you have the header file. */ 14 | #define HAVE_FCNTL_H 1 15 | 16 | /* Define to 1 if you have the `getpagesize' function. */ 17 | #define HAVE_GETPAGESIZE 1 18 | 19 | /* Define to 1 if you have the header file. */ 20 | #define HAVE_INTTYPES_H 1 21 | 22 | /* Define to 1 if you have the `memmove' function. */ 23 | #define HAVE_MEMMOVE 1 24 | 25 | /* Define to 1 if you have the header file. */ 26 | #define HAVE_MEMORY_H 1 27 | 28 | /* Define to 1 if you have a working `mmap' system call. */ 29 | #define HAVE_MMAP 1 30 | 31 | #define HAVE_ERRNO_H 1 32 | 33 | /* Define to 1 if you have the header file. */ 34 | #define HAVE_STDINT_H 1 35 | 36 | /* Define to 1 if you have the header file. */ 37 | #define HAVE_STDLIB_H 1 38 | 39 | /* Define to 1 if you have the header file. */ 40 | #define HAVE_STRINGS_H 1 41 | 42 | /* Define to 1 if you have the header file. */ 43 | #define HAVE_STRING_H 1 44 | 45 | /* Define to 1 if you have the header file. */ 46 | #define HAVE_SYS_PARAM_H 1 47 | 48 | /* Define to 1 if you have the header file. */ 49 | #define HAVE_SYS_STAT_H 1 50 | 51 | /* Define to 1 if you have the header file. */ 52 | #define HAVE_SYS_TYPES_H 1 53 | 54 | /* Define to 1 if you have the header file. */ 55 | #define HAVE_UNISTD_H 1 56 | 57 | /* Define to the sub-directory in which libtool stores uninstalled libraries. 58 | */ 59 | #define LT_OBJDIR ".libs/" 60 | 61 | 62 | /* Define to 1 if you have the ANSI C header files. */ 63 | #define STDC_HEADERS 1 64 | 65 | /* whether byteorder is bigendian */ 66 | /* #undef WORDS_BIGENDIAN */ 67 | 68 | 69 | 70 | /* Define to __FUNCTION__ or "" if `__func__' does not conform to ANSI C. */ 71 | /* #undef __func__ */ 72 | 73 | /* Define to empty if `const' does not conform to ANSI C. */ 74 | /* #undef const */ 75 | 76 | /* Define to `long int' if does not define. */ 77 | /* #undef off_t */ 78 | 79 | /* Define to `unsigned int' if does not define. */ 80 | /* #undef size_t */ 81 | 82 | #undef HAVE_NASM 83 | #undef HAVE_MPGLIB 84 | #undef HAVE_XMMINTRIN_H 85 | 86 | #undef TAKEHIRO_IEEE754_HACK 87 | 88 | #endif 89 | -------------------------------------------------------------------------------- /components/liblame/include/fft.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Fast Fourier Transform include file 3 | * 4 | * Copyright (c) 2000 Mark Taylor 5 | * 6 | * This library is free software; you can redistribute it and/or 7 | * modify it under the terms of the GNU Library General Public 8 | * License as published by the Free Software Foundation; either 9 | * version 2 of the License, or (at your option) any later version. 10 | * 11 | * This library is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 | * Library General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU Library General Public 17 | * License along with this library; if not, write to the 18 | * Free Software Foundation, Inc., 59 Temple Place - Suite 330, 19 | * Boston, MA 02111-1307, USA. 20 | */ 21 | 22 | #ifndef LAME_FFT_H 23 | #define LAME_FFT_H 24 | 25 | void fft_long(lame_internal_flags const *const gfc, FLOAT x_real[BLKSIZE], 26 | int chn, const sample_t *const data[2]); 27 | 28 | void fft_short(lame_internal_flags const *const gfc, FLOAT x_real[3][BLKSIZE_s], 29 | int chn, const sample_t *const data[2]); 30 | 31 | void init_fft(lame_internal_flags * const gfc); 32 | 33 | #endif 34 | 35 | /* End of fft.h */ 36 | -------------------------------------------------------------------------------- /components/liblame/include/id3tag.h: -------------------------------------------------------------------------------- 1 | 2 | #include "freertos/FreeRTOS.h" 3 | 4 | #ifndef LAME_ID3_H 5 | #define LAME_ID3_H 6 | 7 | 8 | #define CHANGED_FLAG (1U << 0) 9 | #define ADD_V2_FLAG (1U << 1) 10 | #define V1_ONLY_FLAG (1U << 2) 11 | #define V2_ONLY_FLAG (1U << 3) 12 | #define SPACE_V1_FLAG (1U << 4) 13 | #define PAD_V2_FLAG (1U << 5) 14 | 15 | enum { 16 | MIMETYPE_NONE = 0, 17 | MIMETYPE_JPEG, 18 | MIMETYPE_PNG, 19 | MIMETYPE_GIF, 20 | }; 21 | 22 | typedef struct FrameDataNode { 23 | struct FrameDataNode *nxt; 24 | uint32_t fid; /* Frame Identifier */ 25 | char lng[4]; /* 3-character language descriptor */ 26 | struct { 27 | union { 28 | char *l; /* ptr to Latin-1 chars */ 29 | unsigned short *u; /* ptr to UCS-2 text */ 30 | unsigned char *b; /* ptr to raw bytes */ 31 | } ptr; 32 | size_t dim; 33 | int enc; /* 0:Latin-1, 1:UCS-2, 2:RAW */ 34 | } dsc , txt; 35 | } FrameDataNode; 36 | 37 | 38 | typedef struct id3tag_spec { 39 | /* private data members */ 40 | unsigned int flags; 41 | int year; 42 | char *title; 43 | char *artist; 44 | char *album; 45 | char *comment; 46 | int track_id3v1; 47 | int genre_id3v1; 48 | unsigned char *albumart; 49 | unsigned int albumart_size; 50 | unsigned int padding_size; 51 | int albumart_mimetype; 52 | FrameDataNode *v2_head, *v2_tail; 53 | } id3tag_spec; 54 | 55 | 56 | /* write tag into stream at current position */ 57 | extern int id3tag_write_v2(lame_global_flags * gfp); 58 | extern int id3tag_write_v1(lame_global_flags * gfp); 59 | /* 60 | * NOTE: A version 2 tag will NOT be added unless one of the text fields won't 61 | * fit in a version 1 tag (e.g. the title string is longer than 30 characters), 62 | * or the "id3tag_add_v2" or "id3tag_v2_only" functions are used. 63 | */ 64 | 65 | #endif 66 | -------------------------------------------------------------------------------- /components/liblame/include/l3side.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Layer 3 side include file 3 | * 4 | * Copyright (c) 1999 Mark Taylor 5 | * 6 | * This library is free software; you can redistribute it and/or 7 | * modify it under the terms of the GNU Library General Public 8 | * License as published by the Free Software Foundation; either 9 | * version 2 of the License, or (at your option) any later version. 10 | * 11 | * This library is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 | * Library General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU Library General Public 17 | * License along with this library; if not, write to the 18 | * Free Software Foundation, Inc., 59 Temple Place - Suite 330, 19 | * Boston, MA 02111-1307, USA. 20 | */ 21 | 22 | #ifndef LAME_L3SIDE_H 23 | #define LAME_L3SIDE_H 24 | 25 | /* max scalefactor band, max(SBMAX_l, SBMAX_s*3, (SBMAX_s-3)*3+8) */ 26 | #define SFBMAX (SBMAX_s*3) 27 | 28 | /* Layer III side information. */ 29 | typedef struct { 30 | int l[1 + SBMAX_l]; 31 | int s[1 + SBMAX_s]; 32 | int psfb21[1 + PSFB21]; 33 | int psfb12[1 + PSFB12]; 34 | } scalefac_struct; 35 | 36 | 37 | typedef struct { 38 | FLOAT l[SBMAX_l]; 39 | FLOAT s[SBMAX_s][3]; 40 | } III_psy_xmin; 41 | 42 | typedef struct { 43 | III_psy_xmin thm; 44 | III_psy_xmin en; 45 | } III_psy_ratio; 46 | 47 | typedef struct { 48 | FLOAT xr[576]; 49 | int l3_enc[576]; 50 | int scalefac[SFBMAX]; 51 | FLOAT xrpow_max; 52 | 53 | int part2_3_length; 54 | int big_values; 55 | int count1; 56 | int global_gain; 57 | int scalefac_compress; 58 | int block_type; 59 | int mixed_block_flag; 60 | int table_select[3]; 61 | int subblock_gain[3 + 1]; 62 | int region0_count; 63 | int region1_count; 64 | int preflag; 65 | int scalefac_scale; 66 | int count1table_select; 67 | 68 | int part2_length; 69 | int sfb_lmax; 70 | int sfb_smin; 71 | int psy_lmax; 72 | int sfbmax; 73 | int psymax; 74 | int sfbdivide; 75 | int width[SFBMAX]; 76 | int window[SFBMAX]; 77 | int count1bits; 78 | /* added for LSF */ 79 | const int *sfb_partition_table; 80 | int slen[4]; 81 | 82 | int max_nonzero_coeff; 83 | char energy_above_cutoff[SFBMAX]; 84 | } gr_info; 85 | 86 | typedef struct { 87 | gr_info tt[2][2]; 88 | int main_data_begin; 89 | int private_bits; 90 | int resvDrain_pre; 91 | int resvDrain_post; 92 | int scfsi[2][4]; 93 | } III_side_info_t; 94 | 95 | #endif 96 | -------------------------------------------------------------------------------- /components/liblame/include/lame_intrin.h: -------------------------------------------------------------------------------- 1 | /* 2 | * lame_intrin.h include file 3 | * 4 | * Copyright (c) 2006 Gabriel Bouvigne 5 | * 6 | * This library is free software; you can redistribute it and/or 7 | * modify it under the terms of the GNU Library General Public 8 | * License as published by the Free Software Foundation; either 9 | * version 2 of the License, or (at your option) any later version. 10 | * 11 | * This library is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 | * Library General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU Library General Public 17 | * License along with this library; if not, write to the 18 | * Free Software Foundation, Inc., 59 Temple Place - Suite 330, 19 | * Boston, MA 02111-1307, USA. 20 | */ 21 | 22 | 23 | #ifndef LAME_INTRIN_H 24 | #define LAME_INTRIN_H 25 | 26 | 27 | void 28 | init_xrpow_core_sse(gr_info * const cod_info, FLOAT xrpow[576], int upper, FLOAT * sum); 29 | 30 | void 31 | fht_SSE2(FLOAT* , int); 32 | 33 | #endif 34 | -------------------------------------------------------------------------------- /components/liblame/include/lameerror.h: -------------------------------------------------------------------------------- 1 | /* 2 | * A collection of LAME Error Codes 3 | * 4 | * Please use the constants defined here instead of some arbitrary 5 | * values. Currently the values starting at -10 to avoid intersection 6 | * with the -1, -2, -3 and -4 used in the current code. 7 | * 8 | * May be this should be a part of the include/lame.h. 9 | */ 10 | 11 | typedef enum { 12 | LAME_OKAY = 0, 13 | LAME_NOERROR = 0, 14 | LAME_GENERICERROR = -1, 15 | LAME_NOMEM = -10, 16 | LAME_BADBITRATE = -11, 17 | LAME_BADSAMPFREQ = -12, 18 | LAME_INTERNALERROR = -13, 19 | 20 | FRONTEND_READERROR = -80, 21 | FRONTEND_WRITEERROR = -81, 22 | FRONTEND_FILETOOLARGE = -82, 23 | 24 | } lame_errorcodes_t; 25 | 26 | /* end of lameerror.h */ 27 | -------------------------------------------------------------------------------- /components/liblame/include/newmdct.h: -------------------------------------------------------------------------------- 1 | /* 2 | * New Modified DCT include file 3 | * 4 | * Copyright (c) 1999 Takehiro TOMINAGA 5 | * 6 | * This library is free software; you can redistribute it and/or 7 | * modify it under the terms of the GNU Library General Public 8 | * License as published by the Free Software Foundation; either 9 | * version 2 of the License, or (at your option) any later version. 10 | * 11 | * This library is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 | * Library General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU Library General Public 17 | * License along with this library; if not, write to the 18 | * Free Software Foundation, Inc., 59 Temple Place - Suite 330, 19 | * Boston, MA 02111-1307, USA. 20 | */ 21 | 22 | #ifndef LAME_NEWMDCT_H 23 | #define LAME_NEWMDCT_H 24 | 25 | void mdct_sub48(lame_internal_flags * gfc, const sample_t * w0, const sample_t * w1); 26 | 27 | #endif /* LAME_NEWMDCT_H */ 28 | -------------------------------------------------------------------------------- /components/liblame/include/psymodel.h: -------------------------------------------------------------------------------- 1 | /* 2 | * psymodel.h 3 | * 4 | * Copyright (c) 1999 Mark Taylor 5 | * 6 | * This library is free software; you can redistribute it and/or 7 | * modify it under the terms of the GNU Library General Public 8 | * License as published by the Free Software Foundation; either 9 | * version 2 of the License, or (at your option) any later version. 10 | * 11 | * This library is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 | * Library General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU Library General Public 17 | * License along with this library; if not, write to the 18 | * Free Software Foundation, Inc., 59 Temple Place - Suite 330, 19 | * Boston, MA 02111-1307, USA. 20 | */ 21 | 22 | #ifndef LAME_PSYMODEL_H 23 | #define LAME_PSYMODEL_H 24 | 25 | 26 | int L3psycho_anal_ns(lame_internal_flags * gfc, 27 | const sample_t *const buffer[2], int gr, 28 | III_psy_ratio ratio[2][2], 29 | III_psy_ratio MS_ratio[2][2], 30 | FLOAT pe[2], FLOAT pe_MS[2], FLOAT ener[2], int blocktype_d[2]); 31 | 32 | int L3psycho_anal_vbr(lame_internal_flags * gfc, 33 | const sample_t *const buffer[2], int gr, 34 | III_psy_ratio ratio[2][2], 35 | III_psy_ratio MS_ratio[2][2], 36 | FLOAT pe[2], FLOAT pe_MS[2], FLOAT ener[2], int blocktype_d[2]); 37 | 38 | 39 | int psymodel_init(lame_global_flags const* gfp); 40 | 41 | 42 | #define rpelev 2 43 | #define rpelev2 16 44 | #define rpelev_s 2 45 | #define rpelev2_s 16 46 | 47 | /* size of each partition band, in barks: */ 48 | #define DELBARK .34 49 | 50 | 51 | /* tuned for output level (sensitive to energy scale) */ 52 | #define VO_SCALE (1./( 14752*14752 )/(BLKSIZE/2)) 53 | 54 | #define temporalmask_sustain_sec 0.01 55 | 56 | #define NS_PREECHO_ATT0 0.8 57 | #define NS_PREECHO_ATT1 0.6 58 | #define NS_PREECHO_ATT2 0.3 59 | 60 | #define NS_MSFIX 3.5 61 | #define NSATTACKTHRE 4.4 62 | #define NSATTACKTHRE_S 25 63 | 64 | #endif /* LAME_PSYMODEL_H */ 65 | -------------------------------------------------------------------------------- /components/liblame/include/quantize.h: -------------------------------------------------------------------------------- 1 | /* 2 | * MP3 quantization 3 | * 4 | * Copyright (c) 1999 Mark Taylor 5 | * 6 | * This library is free software; you can redistribute it and/or 7 | * modify it under the terms of the GNU Library General Public 8 | * License as published by the Free Software Foundation; either 9 | * version 2 of the License, or (at your option) any later version. 10 | * 11 | * This library is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 | * Library General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU Library General Public 17 | * License along with this library; if not, write to the 18 | * Free Software Foundation, Inc., 59 Temple Place - Suite 330, 19 | * Boston, MA 02111-1307, USA. 20 | */ 21 | 22 | #ifndef LAME_QUANTIZE_H 23 | #define LAME_QUANTIZE_H 24 | 25 | void CBR_iteration_loop(lame_internal_flags * gfc, const FLOAT pe[2][2], 26 | const FLOAT ms_ratio[2], const III_psy_ratio ratio[2][2]); 27 | 28 | void VBR_old_iteration_loop(lame_internal_flags * gfc, const FLOAT pe[2][2], 29 | const FLOAT ms_ratio[2], const III_psy_ratio ratio[2][2]); 30 | 31 | void VBR_new_iteration_loop(lame_internal_flags * gfc, const FLOAT pe[2][2], 32 | const FLOAT ms_ratio[2], const III_psy_ratio ratio[2][2]); 33 | 34 | void ABR_iteration_loop(lame_internal_flags * gfc, const FLOAT pe[2][2], 35 | const FLOAT ms_ratio[2], const III_psy_ratio ratio[2][2]); 36 | 37 | 38 | #endif /* LAME_QUANTIZE_H */ 39 | -------------------------------------------------------------------------------- /components/liblame/include/reservoir.h: -------------------------------------------------------------------------------- 1 | /* 2 | * bit reservoir include file 3 | * 4 | * Copyright (c) 1999 Mark Taylor 5 | * 6 | * This library is free software; you can redistribute it and/or 7 | * modify it under the terms of the GNU Library General Public 8 | * License as published by the Free Software Foundation; either 9 | * version 2 of the License, or (at your option) any later version. 10 | * 11 | * This library is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 | * Library General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU Library General Public 17 | * License along with this library; if not, write to the 18 | * Free Software Foundation, Inc., 59 Temple Place - Suite 330, 19 | * Boston, MA 02111-1307, USA. 20 | */ 21 | 22 | #ifndef LAME_RESERVOIR_H 23 | #define LAME_RESERVOIR_H 24 | 25 | int ResvFrameBegin(lame_internal_flags * gfc, int *mean_bits); 26 | void ResvMaxBits(lame_internal_flags * gfc, int mean_bits, int *targ_bits, int *max_bits, 27 | int cbr); 28 | void ResvAdjust(lame_internal_flags * gfc, gr_info const *gi); 29 | void ResvFrameEnd(lame_internal_flags * gfc, int mean_bits); 30 | 31 | #endif /* LAME_RESERVOIR_H */ 32 | -------------------------------------------------------------------------------- /components/liblame/include/set_get.h: -------------------------------------------------------------------------------- 1 | /* 2 | * set_get.h -- Internal set/get definitions 3 | * 4 | * Copyright (C) 2003 Gabriel Bouvigne / Lame project 5 | * 6 | * This library is free software; you can redistribute it and/or 7 | * modify it under the terms of the GNU Library General Public 8 | * License as published by the Free Software Foundation; either 9 | * version 2 of the License, or (at your option) any later version. 10 | * 11 | * This library is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 | * Library General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU Library General Public 17 | * License along with this library; if not, write to the Free Software 18 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. 19 | */ 20 | 21 | #ifndef __SET_GET_H__ 22 | #define __SET_GET_H__ 23 | 24 | #include "lame.h" 25 | 26 | #if defined(__cplusplus) 27 | extern "C" { 28 | #endif 29 | 30 | /* select psychoacoustic model */ 31 | 32 | /* manage short blocks */ 33 | int CDECL lame_set_short_threshold(lame_global_flags *, float, float); 34 | int CDECL lame_set_short_threshold_lrm(lame_global_flags *, float); 35 | float CDECL lame_get_short_threshold_lrm(const lame_global_flags *); 36 | int CDECL lame_set_short_threshold_s(lame_global_flags *, float); 37 | float CDECL lame_get_short_threshold_s(const lame_global_flags *); 38 | 39 | 40 | int CDECL lame_set_maskingadjust(lame_global_flags *, float); 41 | float CDECL lame_get_maskingadjust(const lame_global_flags *); 42 | 43 | int CDECL lame_set_maskingadjust_short(lame_global_flags *, float); 44 | float CDECL lame_get_maskingadjust_short(const lame_global_flags *); 45 | 46 | /* select ATH formula 4 shape */ 47 | int CDECL lame_set_ATHcurve(lame_global_flags *, float); 48 | float CDECL lame_get_ATHcurve(const lame_global_flags *); 49 | 50 | int CDECL lame_set_preset_notune(lame_global_flags *, int); 51 | 52 | /* substep shaping method */ 53 | int CDECL lame_set_substep(lame_global_flags *, int); 54 | int CDECL lame_get_substep(const lame_global_flags *); 55 | 56 | /* scalefactors scale */ 57 | int CDECL lame_set_sfscale(lame_global_flags *, int); 58 | int CDECL lame_get_sfscale(const lame_global_flags *); 59 | 60 | /* subblock gain */ 61 | int CDECL lame_set_subblock_gain(lame_global_flags *, int); 62 | int CDECL lame_get_subblock_gain(const lame_global_flags *); 63 | 64 | 65 | 66 | /*presets*/ 67 | int apply_preset(lame_global_flags *, int preset, int enforce); 68 | 69 | void CDECL lame_set_tune(lame_t, float); /* FOR INTERNAL USE ONLY */ 70 | void CDECL lame_set_msfix(lame_t gfp, double msfix); 71 | 72 | 73 | #if defined(__cplusplus) 74 | } 75 | #endif 76 | #endif 77 | -------------------------------------------------------------------------------- /components/liblame/include/tables.h: -------------------------------------------------------------------------------- 1 | /* 2 | * MPEG layer 3 tables include file 3 | * 4 | * Copyright (c) 1999 Albert L Faber 5 | * 6 | * This library is free software; you can redistribute it and/or 7 | * modify it under the terms of the GNU Library General Public 8 | * License as published by the Free Software Foundation; either 9 | * version 2 of the License, or (at your option) any later version. 10 | * 11 | * This library is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 | * Library General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU Library General Public 17 | * License along with this library; if not, write to the 18 | * Free Software Foundation, Inc., 59 Temple Place - Suite 330, 19 | * Boston, MA 02111-1307, USA. 20 | */ 21 | 22 | #ifndef LAME_TABLES_H 23 | #define LAME_TABLES_H 24 | 25 | #if 0 26 | typedef struct { 27 | unsigned char no; 28 | unsigned char width; 29 | unsigned char minval_2; 30 | float quiet_thr; 31 | float norm; 32 | float bark; 33 | } type1_t; 34 | 35 | typedef struct { 36 | unsigned char no; 37 | unsigned char width; 38 | float quiet_thr; 39 | float norm; 40 | float SNR; 41 | float bark; 42 | } type2_t; 43 | 44 | typedef struct { 45 | unsigned int no:5; 46 | unsigned int cbw:3; 47 | unsigned int bu:6; 48 | unsigned int bo:6; 49 | unsigned int w1_576:10; 50 | unsigned int w2_576:10; 51 | } type34_t; 52 | 53 | typedef struct { 54 | size_t len1; 55 | const type1_t *const tab1; 56 | size_t len2; 57 | const type2_t *const tab2; 58 | size_t len3; 59 | const type34_t *const tab3; 60 | size_t len4; 61 | const type34_t *const tab4; 62 | } type5_t; 63 | 64 | extern const type5_t table5[6]; 65 | 66 | #endif 67 | 68 | #define HTN 34 69 | 70 | struct huffcodetab { 71 | const unsigned int xlen; /* max. x-index+ */ 72 | const unsigned int linmax; /* max number to be stored in linbits */ 73 | const uint16_t *table; /* pointer to array[xlen][ylen] */ 74 | const uint8_t *hlen; /* pointer to array[xlen][ylen] */ 75 | }; 76 | 77 | extern const struct huffcodetab ht[HTN]; 78 | /* global memory block */ 79 | /* array of all huffcodtable headers */ 80 | /* 0..31 Huffman code table 0..31 */ 81 | /* 32,33 count1-tables */ 82 | 83 | extern const uint8_t t32l[]; 84 | extern const uint8_t t33l[]; 85 | 86 | extern const uint32_t largetbl[16 * 16]; 87 | extern const uint32_t table23[3 * 3]; 88 | extern const uint32_t table56[4 * 4]; 89 | 90 | extern const int scfsi_band[5]; 91 | 92 | extern const int bitrate_table [3][16]; 93 | extern const int samplerate_table [3][ 4]; 94 | 95 | #endif /* LAME_TABLES_H */ 96 | -------------------------------------------------------------------------------- /components/liblame/include/vbrquantize.h: -------------------------------------------------------------------------------- 1 | /* 2 | * MP3 VBR quantization 3 | * 4 | * Copyright (c) 1999 Mark Taylor 5 | * 6 | * This library is free software; you can redistribute it and/or 7 | * modify it under the terms of the GNU Library General Public 8 | * License as published by the Free Software Foundation; either 9 | * version 2 of the License, or (at your option) any later version. 10 | * 11 | * This library is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 | * Library General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU Library General Public 17 | * License along with this library; if not, write to the 18 | * Free Software Foundation, Inc., 59 Temple Place - Suite 330, 19 | * Boston, MA 02111-1307, USA. 20 | */ 21 | 22 | #ifndef LAME_VBRQUANTIZE_H 23 | #define LAME_VBRQUANTIZE_H 24 | 25 | int VBR_encode_frame(lame_internal_flags * gfc, const FLOAT xr34orig[2][2][576], 26 | const FLOAT l3_xmin[2][2][SFBMAX], const int maxbits[2][2]); 27 | 28 | #endif /* LAME_VBRQUANTIZE_H */ 29 | -------------------------------------------------------------------------------- /components/liblame/include/version.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Version numbering for LAME. 3 | * 4 | * Copyright (c) 1999 A.L. Faber 5 | * 6 | * This library is free software; you can redistribute it and/or 7 | * modify it under the terms of the GNU Library General Public 8 | * License as published by the Free Software Foundation; either 9 | * version 2 of the License, or (at your option) any later version. 10 | * 11 | * This library is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 | * Library General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU Library General Public 17 | * License along with this library; if not, write to the 18 | * Free Software Foundation, Inc., 59 Temple Place - Suite 330, 19 | * Boston, MA 02111-1307, USA. 20 | */ 21 | 22 | #ifndef LAME_VERSION_H 23 | #define LAME_VERSION_H 24 | 25 | 26 | /* 27 | * To make a string from a token, use the # operator: 28 | */ 29 | #ifndef STR 30 | # define __STR(x) #x 31 | # define STR(x) __STR(x) 32 | #endif 33 | 34 | # define LAME_URL "http://lame.sf.net" 35 | 36 | 37 | # define LAME_MAJOR_VERSION 3 /* Major version number */ 38 | # define LAME_MINOR_VERSION 99 /* Minor version number */ 39 | # define LAME_TYPE_VERSION 2 /* 0:alpha 1:beta 2:release */ 40 | # define LAME_PATCH_VERSION 5 /* Patch level */ 41 | # define LAME_ALPHA_VERSION (LAME_TYPE_VERSION==0) 42 | # define LAME_BETA_VERSION (LAME_TYPE_VERSION==1) 43 | # define LAME_RELEASE_VERSION (LAME_TYPE_VERSION==2) 44 | 45 | # define PSY_MAJOR_VERSION 1 /* Major version number */ 46 | # define PSY_MINOR_VERSION 0 /* Minor version number */ 47 | # define PSY_ALPHA_VERSION 0 /* Set number if this is an alpha version, otherwise zero */ 48 | # define PSY_BETA_VERSION 0 /* Set number if this is a beta version, otherwise zero */ 49 | 50 | #if LAME_ALPHA_VERSION 51 | #define LAME_PATCH_LEVEL_STRING " alpha " STR(LAME_PATCH_VERSION) 52 | #endif 53 | #if LAME_BETA_VERSION 54 | #define LAME_PATCH_LEVEL_STRING " beta " STR(LAME_PATCH_VERSION) 55 | #endif 56 | #if LAME_RELEASE_VERSION 57 | #if LAME_PATCH_VERSION 58 | #define LAME_PATCH_LEVEL_STRING " release " STR(LAME_PATCH_VERSION) 59 | #else 60 | #define LAME_PATCH_LEVEL_STRING "" 61 | #endif 62 | #endif 63 | 64 | # define LAME_VERSION_STRING STR(LAME_MAJOR_VERSION) "." STR(LAME_MINOR_VERSION) LAME_PATCH_LEVEL_STRING 65 | 66 | #endif /* LAME_VERSION_H */ 67 | 68 | /* End of version.h */ 69 | -------------------------------------------------------------------------------- /components/liblame/library/LICENSE: -------------------------------------------------------------------------------- 1 | Can I use LAME in my commercial program? 2 | 3 | Yes, you can, under the restrictions of the LGPL. The easiest 4 | way to do this is to: 5 | 6 | 1. Link to LAME as separate library (libmp3lame.a on unix or 7 | lame_enc.dll or libmp3lame.dll on windows) 8 | 9 | 2. Fully acknowledge that you are using LAME, and give a link 10 | to our web site, www.mp3dev.org 11 | 12 | 3. If you make modifications to LAME, you *must* release these 13 | these modifications back to the LAME project, under the LGPL. 14 | -------------------------------------------------------------------------------- /components/liblame/library/vector/lame_intrin.h: -------------------------------------------------------------------------------- 1 | /* 2 | * lame_intrin.h include file 3 | * 4 | * Copyright (c) 2006 Gabriel Bouvigne 5 | * 6 | * This library is free software; you can redistribute it and/or 7 | * modify it under the terms of the GNU Library General Public 8 | * License as published by the Free Software Foundation; either 9 | * version 2 of the License, or (at your option) any later version. 10 | * 11 | * This library is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 | * Library General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU Library General Public 17 | * License along with this library; if not, write to the 18 | * Free Software Foundation, Inc., 59 Temple Place - Suite 330, 19 | * Boston, MA 02111-1307, USA. 20 | */ 21 | 22 | 23 | #ifndef LAME_INTRIN_H 24 | #define LAME_INTRIN_H 25 | 26 | 27 | void 28 | init_xrpow_core_sse(gr_info * const cod_info, FLOAT xrpow[576], int upper, FLOAT * sum); 29 | 30 | void 31 | fht_SSE2(FLOAT* , int); 32 | 33 | #endif 34 | -------------------------------------------------------------------------------- /components/libmdns/component.mk: -------------------------------------------------------------------------------- 1 | # 2 | # Main component makefile. 3 | # 4 | # This Makefile can be left empty. By default, it will take the sources in the 5 | # src/ directory, compile them and link them into lib(subdirectory_name).a 6 | # in the build directory. This behaviour is entirely configurable, 7 | # please read the ESP-IDF documents if you need to do this. 8 | # 9 | -------------------------------------------------------------------------------- /components/libmdns/include/mdns_task.h: -------------------------------------------------------------------------------- 1 | #ifndef MDNS_TASK 2 | #define MDNS_TASK 3 | 4 | 5 | 6 | void init_mdns(); 7 | 8 | 9 | 10 | 11 | 12 | 13 | #endif -------------------------------------------------------------------------------- /components/libmdns/mdns_task.c: -------------------------------------------------------------------------------- 1 | /* MDNS-SD Query and advertise Example 2 | 3 | This example code is in the Public Domain (or CC0 licensed, at your option.) 4 | 5 | Unless required by applicable law or agreed to in writing, this 6 | software is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR 7 | CONDITIONS OF ANY KIND, either express or implied. 8 | */ 9 | #include 10 | #include "freertos/FreeRTOS.h" 11 | #include "freertos/task.h" 12 | #include "freertos/event_groups.h" 13 | #include "esp_system.h" 14 | #include "esp_wifi.h" 15 | #include "esp_event_loop.h" 16 | #include "esp_log.h" 17 | #include "nvs_flash.h" 18 | #include "mdns.h" 19 | 20 | /* The examples use simple WiFi configuration that you can set via 21 | 'make menuconfig'. 22 | 23 | If you'd rather not, just change the below entries to strings with 24 | the config you want - ie #define EXAMPLE_WIFI_SSID "mywifissid" 25 | */ 26 | 27 | 28 | #define EXAMPLE_MDNS_HOSTNAME "esp32" 29 | #define EXAMPLE_MDNS_INSTANCE "esp32 mdns" 30 | 31 | 32 | static const char *TAG = "mdns-task"; 33 | 34 | static void initialise_mdns(void) 35 | { 36 | //initialize mDNS 37 | ESP_ERROR_CHECK( mdns_init() ); 38 | //set mDNS hostname (required if you want to advertise services) 39 | ESP_ERROR_CHECK( mdns_hostname_set(EXAMPLE_MDNS_HOSTNAME) ); 40 | //set default mDNS instance name 41 | ESP_ERROR_CHECK( mdns_instance_name_set(EXAMPLE_MDNS_INSTANCE) ); 42 | 43 | //structure with TXT records 44 | mdns_txt_item_t serviceTxtData[3] = { 45 | {"board","esp32"}, 46 | {"u","user"}, 47 | {"p","password"} 48 | }; 49 | 50 | //initialize service 51 | ESP_ERROR_CHECK( mdns_service_add("ESP32-WebServer", "_http", "_tcp", 80, serviceTxtData, 3) ); 52 | //add another TXT item 53 | ESP_ERROR_CHECK( mdns_service_txt_item_set("_http", "_tcp", "path", "/foobar") ); 54 | //change TXT item value 55 | ESP_ERROR_CHECK( mdns_service_txt_item_set("_http", "_tcp", "u", "admin") ); 56 | } 57 | static void query_mdns_host(const char * host_name) 58 | { 59 | ESP_LOGI(TAG, "Query A: %s.local", host_name); 60 | 61 | struct ip4_addr addr; 62 | addr.addr = 0; 63 | 64 | esp_err_t err = mdns_query_a(host_name, 2000, &addr); 65 | if(err){ 66 | if(err == ESP_ERR_NOT_FOUND){ 67 | ESP_LOGW(TAG, "Host was not found!"); 68 | return; 69 | } 70 | ESP_LOGE(TAG, "Query Failed"); 71 | return; 72 | } 73 | 74 | ESP_LOGI(TAG, IPSTR, IP2STR(&addr)); 75 | } 76 | 77 | void init_mdns() 78 | { 79 | initialise_mdns(); 80 | } 81 | 82 | -------------------------------------------------------------------------------- /components/mad/Makefile: -------------------------------------------------------------------------------- 1 | 2 | ############################################################# 3 | # Required variables for each makefile 4 | # Discard this section from all parent makefiles 5 | # Expected variables (with automatic defaults): 6 | # CSRCS (all "C" files in the dir) 7 | # SUBDIRS (all subdirs with a Makefile) 8 | # GEN_LIBS - list of libs to be generated () 9 | # GEN_IMAGES - list of images to be generated () 10 | # COMPONENTS_xxx - a list of libs/objs in the form 11 | # subdir/lib to be extracted and rolled up into 12 | # a generated lib/image xxx.a () 13 | # 14 | ifndef PDIR 15 | GEN_LIBS = libmad.a 16 | endif 17 | 18 | 19 | ############################################################# 20 | # Configuration i.e. compile options etc. 21 | # Target specific stuff (defines etc.) goes in here! 22 | # Generally values applying to a tree are captured in the 23 | # makefile at its root level - these are then overridden 24 | # for a subtree within the makefile rooted therein 25 | # 26 | #DEFINES += 27 | 28 | ############################################################# 29 | # Recursion Magic - Don't touch this!! 30 | # 31 | # Each subtree potentially has an include directory 32 | # corresponding to the common APIs applicable to modules 33 | # rooted at that subtree. Accordingly, the INCLUDE PATH 34 | # of a module can only contain the include directories up 35 | # its parent path, and not its siblings 36 | # 37 | # Required for each makefile to inherit from the parent 38 | # 39 | 40 | INCLUDES := $(INCLUDES) -I $(PDIR)include 41 | PDIR := ../$(PDIR) 42 | 43 | sinclude $(PDIR)Makefile 44 | 45 | -------------------------------------------------------------------------------- /components/mad/align.c: -------------------------------------------------------------------------------- 1 | 2 | // #include "esp_common.h" 3 | 4 | char unalChar(const unsigned char *adr) { 5 | int *p=(int *)((int)adr&0xfffffffc); 6 | int v=*p; 7 | int w=((int)adr&3); 8 | if (w==0) return ((v>>0)&0xff); 9 | if (w==1) return ((v>>8)&0xff); 10 | if (w==2) return ((v>>16)&0xff); 11 | if (w==3) return ((v>>24)&0xff); 12 | return v; 13 | } 14 | 15 | 16 | short unalShort(const short unsigned *adr) { 17 | int *p=(int *)((int)adr&0xfffffffc); 18 | int v=*p; 19 | int w=((int)adr&3); 20 | if (w==0) return (v&0xffff); else return (v>>16); 21 | } 22 | -------------------------------------------------------------------------------- /components/mad/component.mk: -------------------------------------------------------------------------------- 1 | ifdef CONFIG_AUDIO_MAD 2 | COMPONENT_ADD_INCLUDEDIRS := include 3 | CFLAGS += -DCONFIG_AUDIO_MAD 4 | 5 | endif 6 | 7 | -------------------------------------------------------------------------------- /components/mad/fixed.c: -------------------------------------------------------------------------------- 1 | /* 2 | * libmad - MPEG audio decoder library 3 | * Copyright (C) 2000-2004 Underbit Technologies, Inc. 4 | * 5 | * This program is free software; you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation; either version 2 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program; if not, write to the Free Software 17 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 18 | * 19 | * $Id: fixed.c,v 1.13 2004/01/23 09:41:32 rob Exp $ 20 | */ 21 | 22 | # ifdef HAVE_CONFIG_H 23 | # include "config.h" 24 | # endif 25 | 26 | # include "global.h" 27 | 28 | # include "fixed.h" 29 | 30 | /* 31 | * NAME: fixed->abs() 32 | * DESCRIPTION: return absolute value of a fixed-point number 33 | */ 34 | mad_fixed_t mad_f_abs(mad_fixed_t x) 35 | { 36 | return x < 0 ? -x : x; 37 | } 38 | 39 | /* 40 | * NAME: fixed->div() 41 | * DESCRIPTION: perform division using fixed-point math 42 | */ 43 | mad_fixed_t mad_f_div(mad_fixed_t x, mad_fixed_t y) 44 | { 45 | mad_fixed_t q, r; 46 | unsigned int bits; 47 | 48 | q = mad_f_abs(x / y); 49 | 50 | if (x < 0) { 51 | x = -x; 52 | y = -y; 53 | } 54 | 55 | r = x % y; 56 | 57 | if (y < 0) { 58 | x = -x; 59 | y = -y; 60 | } 61 | 62 | if (q > mad_f_intpart(MAD_F_MAX) && 63 | !(q == -mad_f_intpart(MAD_F_MIN) && r == 0 && (x < 0) != (y < 0))) 64 | return 0; 65 | 66 | for (bits = MAD_F_FRACBITS; bits && r; --bits) { 67 | q <<= 1, r <<= 1; 68 | if (r >= y) 69 | r -= y, ++q; 70 | } 71 | 72 | /* round */ 73 | if (2 * r >= y) 74 | ++q; 75 | 76 | /* fix sign */ 77 | if ((x < 0) != (y < 0)) 78 | q = -q; 79 | 80 | return q << bits; 81 | } 82 | -------------------------------------------------------------------------------- /components/mad/imdct_s.dat: -------------------------------------------------------------------------------- 1 | /* 2 | * libmad - MPEG audio decoder library 3 | * Copyright (C) 2000-2004 Underbit Technologies, Inc. 4 | * 5 | * This program is free software; you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation; either version 2 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program; if not, write to the Free Software 17 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 18 | * 19 | * $Id: imdct_s.dat,v 1.8 2004/01/23 09:41:32 rob Exp $ 20 | */ 21 | 22 | /* 0 */ { MAD_F(0x09bd7ca0) /* 0.608761429 */, 23 | -MAD_F(0x0ec835e8) /* -0.923879533 */, 24 | -MAD_F(0x0216a2a2) /* -0.130526192 */, 25 | MAD_F(0x0fdcf549) /* 0.991444861 */, 26 | -MAD_F(0x061f78aa) /* -0.382683432 */, 27 | -MAD_F(0x0cb19346) /* -0.793353340 */ }, 28 | 29 | /* 6 */ { -MAD_F(0x0cb19346) /* -0.793353340 */, 30 | MAD_F(0x061f78aa) /* 0.382683432 */, 31 | MAD_F(0x0fdcf549) /* 0.991444861 */, 32 | MAD_F(0x0216a2a2) /* 0.130526192 */, 33 | -MAD_F(0x0ec835e8) /* -0.923879533 */, 34 | -MAD_F(0x09bd7ca0) /* -0.608761429 */ }, 35 | 36 | /* 1 */ { MAD_F(0x061f78aa) /* 0.382683432 */, 37 | -MAD_F(0x0ec835e8) /* -0.923879533 */, 38 | MAD_F(0x0ec835e8) /* 0.923879533 */, 39 | -MAD_F(0x061f78aa) /* -0.382683432 */, 40 | -MAD_F(0x061f78aa) /* -0.382683432 */, 41 | MAD_F(0x0ec835e8) /* 0.923879533 */ }, 42 | 43 | /* 7 */ { -MAD_F(0x0ec835e8) /* -0.923879533 */, 44 | -MAD_F(0x061f78aa) /* -0.382683432 */, 45 | MAD_F(0x061f78aa) /* 0.382683432 */, 46 | MAD_F(0x0ec835e8) /* 0.923879533 */, 47 | MAD_F(0x0ec835e8) /* 0.923879533 */, 48 | MAD_F(0x061f78aa) /* 0.382683432 */ }, 49 | 50 | /* 2 */ { MAD_F(0x0216a2a2) /* 0.130526192 */, 51 | -MAD_F(0x061f78aa) /* -0.382683432 */, 52 | MAD_F(0x09bd7ca0) /* 0.608761429 */, 53 | -MAD_F(0x0cb19346) /* -0.793353340 */, 54 | MAD_F(0x0ec835e8) /* 0.923879533 */, 55 | -MAD_F(0x0fdcf549) /* -0.991444861 */ }, 56 | 57 | /* 8 */ { -MAD_F(0x0fdcf549) /* -0.991444861 */, 58 | -MAD_F(0x0ec835e8) /* -0.923879533 */, 59 | -MAD_F(0x0cb19346) /* -0.793353340 */, 60 | -MAD_F(0x09bd7ca0) /* -0.608761429 */, 61 | -MAD_F(0x061f78aa) /* -0.382683432 */, 62 | -MAD_F(0x0216a2a2) /* -0.130526192 */ } 63 | -------------------------------------------------------------------------------- /components/mad/include/align.h: -------------------------------------------------------------------------------- 1 | char unalChar(char unsigned const *adr); 2 | short unalShort(short unsigned const *adr); 3 | -------------------------------------------------------------------------------- /components/mad/include/bit.h: -------------------------------------------------------------------------------- 1 | /* 2 | * libmad - MPEG audio decoder library 3 | * Copyright (C) 2000-2004 Underbit Technologies, Inc. 4 | * 5 | * This program is free software; you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation; either version 2 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program; if not, write to the Free Software 17 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 18 | * 19 | * $Id: bit.h,v 1.12 2004/01/23 09:41:32 rob Exp $ 20 | */ 21 | 22 | # ifndef LIBMAD_BIT_H 23 | # define LIBMAD_BIT_H 24 | 25 | struct mad_bitptr { 26 | unsigned char const *byte; 27 | unsigned short cache; 28 | unsigned short left; 29 | }; 30 | 31 | void mad_bit_init(struct mad_bitptr *, unsigned char const *); 32 | 33 | # define mad_bit_finish(bitptr) /* nothing */ 34 | 35 | unsigned int mad_bit_length(struct mad_bitptr const *, 36 | struct mad_bitptr const *); 37 | 38 | # define mad_bit_bitsleft(bitptr) ((bitptr)->left) 39 | unsigned char const *mad_bit_nextbyte(struct mad_bitptr const *); 40 | 41 | void mad_bit_skip(struct mad_bitptr *, unsigned int); 42 | unsigned long mad_bit_read(struct mad_bitptr *, unsigned int); 43 | void mad_bit_write(struct mad_bitptr *, unsigned int, unsigned long); 44 | 45 | unsigned short mad_bit_crc(struct mad_bitptr, unsigned int, unsigned short); 46 | 47 | # endif 48 | -------------------------------------------------------------------------------- /components/mad/include/config.h: -------------------------------------------------------------------------------- 1 | /* config.h. Generated by configure. */ 2 | /* config.h.in. Generated from configure.ac by autoheader. */ 3 | 4 | /* Define to enable diagnostic debugging support. */ 5 | /* #undef DEBUG */ 6 | 7 | /* Define to enable experimental code. */ 8 | /* #undef EXPERIMENTAL */ 9 | 10 | /* Define to disable debugging assertions. */ 11 | #define NDEBUG 12 | 13 | /* Define to optimize for accuracy over speed. */ 14 | /* #undef OPT_ACCURACY */ 15 | 16 | /* Define to optimize for speed over accuracy. */ 17 | #define OPT_SPEED 1 18 | 19 | /* Define to enable a fast subband synthesis approximation optimization. */ 20 | #define OPT_SSO 21 | 22 | /* Define to influence a strict interpretation of the ISO/IEC standards, even 23 | if this is in opposition with best accepted practices. */ 24 | /* #undef OPT_STRICT */ 25 | 26 | /* Name of package */ 27 | #define PACKAGE "libmad" 28 | 29 | /* Define to the address where bug reports for this package should be sent. */ 30 | #define PACKAGE_BUGREPORT "support@underbit.com" 31 | 32 | /* Define to the full name of this package. */ 33 | #define PACKAGE_NAME "MPEG Audio Decoder" 34 | 35 | /* Define to the full name and version of this package. */ 36 | #define PACKAGE_STRING "MPEG Audio Decoder 0.15.1b" 37 | 38 | /* Define to the one symbol short name of this package. */ 39 | #define PACKAGE_TARNAME "libmad" 40 | 41 | /* Define to the version of this package. */ 42 | #define PACKAGE_VERSION "0.15.1b" 43 | 44 | /* The size of a `int', as computed by sizeof. */ 45 | #define SIZEOF_INT 4 46 | 47 | /* The size of a `long', as computed by sizeof. */ 48 | #define SIZEOF_LONG 4 49 | 50 | /* The size of a `long long', as computed by sizeof. */ 51 | #define SIZEOF_LONG_LONG 8 52 | 53 | /* Define to 1 if you have the ANSI C header files. */ 54 | #undef STDC_HEADERS 55 | 56 | /* Version number of package */ 57 | #define VERSION "0.15.1b" 58 | 59 | /* Define to 1 if your processor stores words with the most significant byte 60 | first (like Motorola and SPARC, unlike Intel and VAX). */ 61 | /* #undef WORDS_BIGENDIAN */ 62 | 63 | /* Define to empty if `const' does not conform to ANSI C. */ 64 | /* #undef const */ 65 | 66 | /* Define to `__inline__' or `__inline' if that's what the C compiler 67 | calls it, or to nothing if 'inline' is not supported under any name. */ 68 | #ifndef __cplusplus 69 | /* #undef inline */ 70 | #endif 71 | 72 | #define FPM_DEFAULT 73 | 74 | /* Define to `int' if does not define. */ 75 | /* #undef pid_t */ 76 | -------------------------------------------------------------------------------- /components/mad/include/global.h: -------------------------------------------------------------------------------- 1 | /* 2 | * libmad - MPEG audio decoder library 3 | * Copyright (C) 2000-2004 Underbit Technologies, Inc. 4 | * 5 | * This program is free software; you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation; either version 2 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program; if not, write to the Free Software 17 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 18 | * 19 | * $Id: global.h,v 1.11 2004/01/23 09:41:32 rob Exp $ 20 | */ 21 | 22 | # ifndef LIBMAD_GLOBAL_H 23 | # define LIBMAD_GLOBAL_H 24 | 25 | // #include "esp_common.h" 26 | #include "config.h" 27 | /* conditional debugging */ 28 | 29 | # if defined(DEBUG) && defined(NDEBUG) 30 | # error "cannot define both DEBUG and NDEBUG" 31 | # endif 32 | 33 | # if defined(DEBUG) 34 | # include 35 | # endif 36 | 37 | /* conditional features */ 38 | 39 | # if defined(OPT_SPEED) && defined(OPT_ACCURACY) 40 | # error "cannot optimize for both speed and accuracy" 41 | # endif 42 | 43 | # if defined(OPT_SPEED) && !defined(OPT_SSO) 44 | # define OPT_SSO 45 | # endif 46 | 47 | # if defined(HAVE_UNISTD_H) && defined(HAVE_WAITPID) && \ 48 | defined(HAVE_FCNTL) && defined(HAVE_PIPE) && defined(HAVE_FORK) 49 | # define USE_ASYNC 50 | # endif 51 | 52 | # if !defined(HAVE_ASSERT_H) 53 | //# if defined(NDEBUG) 54 | # define assert(x) /* nothing */ 55 | //# else 56 | //# define assert(x) do { if (!(x)) abort(); } while (0) 57 | //# endif 58 | # endif 59 | 60 | void render_sample_block(short *short_sample_buff, int no_samples); 61 | void set_dac_sample_rate(int rate); 62 | 63 | # endif 64 | -------------------------------------------------------------------------------- /components/mad/include/huffman.h: -------------------------------------------------------------------------------- 1 | /* 2 | * libmad - MPEG audio decoder library 3 | * Copyright (C) 2000-2004 Underbit Technologies, Inc. 4 | * 5 | * This program is free software; you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation; either version 2 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program; if not, write to the Free Software 17 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 18 | * 19 | * $Id: huffman.h,v 1.11 2004/01/23 09:41:32 rob Exp $ 20 | */ 21 | 22 | # ifndef LIBMAD_HUFFMAN_H 23 | # define LIBMAD_HUFFMAN_H 24 | 25 | union huffquad { 26 | struct { 27 | unsigned int final : 1; 28 | unsigned int bits : 3; 29 | unsigned int offset : 12; 30 | } ptr; 31 | struct { 32 | unsigned int final : 1; 33 | unsigned int hlen : 3; 34 | unsigned int v : 1; 35 | unsigned int w : 1; 36 | unsigned int x : 1; 37 | unsigned int y : 1; 38 | } value; 39 | unsigned int final : 1; 40 | }; 41 | 42 | union huffpair { 43 | struct { 44 | unsigned int final : 1; 45 | unsigned int bits : 3; 46 | unsigned int offset : 12; 47 | } ptr; 48 | struct { 49 | unsigned int final : 1; 50 | unsigned int hlen : 3; 51 | unsigned int x : 4; 52 | unsigned int y : 4; 53 | } value; 54 | unsigned int final : 1; 55 | }; 56 | 57 | struct hufftable { 58 | union huffpair const *table; 59 | unsigned int linbits; 60 | unsigned int startbits; 61 | }; 62 | 63 | extern union huffquad const *const mad_huff_quad_table[2]; 64 | extern struct hufftable const mad_huff_pair_table[32]; 65 | 66 | # endif 67 | -------------------------------------------------------------------------------- /components/mad/include/layer3.h: -------------------------------------------------------------------------------- 1 | /* 2 | * libmad - MPEG audio decoder library 3 | * Copyright (C) 2000-2004 Underbit Technologies, Inc. 4 | * 5 | * This program is free software; you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation; either version 2 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program; if not, write to the Free Software 17 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 18 | * 19 | * $Id: layer3.h,v 1.10 2004/01/23 09:41:32 rob Exp $ 20 | */ 21 | 22 | # ifndef LIBMAD_LAYER3_H 23 | # define LIBMAD_LAYER3_H 24 | 25 | # include "stream.h" 26 | # include "frame.h" 27 | 28 | int mad_layer_III(struct mad_stream *, struct mad_frame *); 29 | 30 | extern main_data_t MainData; 31 | 32 | # endif 33 | -------------------------------------------------------------------------------- /components/mad/include/synth.h: -------------------------------------------------------------------------------- 1 | /* 2 | * libmad - MPEG audio decoder library 3 | * Copyright (C) 2000-2004 Underbit Technologies, Inc. 4 | * 5 | * This program is free software; you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation; either version 2 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program; if not, write to the Free Software 17 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 18 | * 19 | * $Id: synth.h,v 1.15 2004/01/23 09:41:33 rob Exp $ 20 | */ 21 | 22 | # ifndef LIBMAD_SYNTH_H 23 | # define LIBMAD_SYNTH_H 24 | 25 | # include "fixed.h" 26 | # include "frame.h" 27 | 28 | struct mad_pcm { 29 | unsigned int samplerate; /* sampling frequency (Hz) */ 30 | unsigned short channels; /* number of channels */ 31 | unsigned short length; /* number of samples per channel */ 32 | }; 33 | 34 | struct mad_synth { 35 | mad_fixed_t filter[2][2][2][16][8]; /* polyphase filterbank outputs */ 36 | /* [ch][eo][peo][s][v] */ 37 | 38 | unsigned int phase; /* current processing phase */ 39 | 40 | struct mad_pcm pcm; /* PCM output */ 41 | }; 42 | 43 | /* single channel PCM selector */ 44 | enum { 45 | MAD_PCM_CHANNEL_SINGLE = 0 46 | }; 47 | 48 | /* dual channel PCM selector */ 49 | enum { 50 | MAD_PCM_CHANNEL_DUAL_1 = 0, 51 | MAD_PCM_CHANNEL_DUAL_2 = 1 52 | }; 53 | 54 | /* stereo PCM selector */ 55 | enum { 56 | MAD_PCM_CHANNEL_STEREO_LEFT = 0, 57 | MAD_PCM_CHANNEL_STEREO_RIGHT = 1 58 | }; 59 | 60 | void mad_synth_init(struct mad_synth *); 61 | 62 | # define mad_synth_finish(synth) /* nothing */ 63 | 64 | void mad_synth_mute(struct mad_synth *); 65 | 66 | void mad_synth_frame(struct mad_synth *, struct mad_frame const *); 67 | 68 | # endif 69 | -------------------------------------------------------------------------------- /components/mad/include/version.h: -------------------------------------------------------------------------------- 1 | /* 2 | * libmad - MPEG audio decoder library 3 | * Copyright (C) 2000-2004 Underbit Technologies, Inc. 4 | * 5 | * This program is free software; you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation; either version 2 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program; if not, write to the Free Software 17 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 18 | * 19 | * $Id: version.h,v 1.26 2004/01/23 09:41:33 rob Exp $ 20 | */ 21 | 22 | # ifndef LIBMAD_VERSION_H 23 | # define LIBMAD_VERSION_H 24 | 25 | # define MAD_VERSION_MAJOR 0 26 | # define MAD_VERSION_MINOR 15 27 | # define MAD_VERSION_PATCH 1 28 | # define MAD_VERSION_EXTRA " (beta)" 29 | 30 | # define MAD_VERSION_STRINGIZE(str) #str 31 | # define MAD_VERSION_STRING(num) MAD_VERSION_STRINGIZE(num) 32 | 33 | # define MAD_VERSION MAD_VERSION_STRING(MAD_VERSION_MAJOR) "." \ 34 | MAD_VERSION_STRING(MAD_VERSION_MINOR) "." \ 35 | MAD_VERSION_STRING(MAD_VERSION_PATCH) \ 36 | MAD_VERSION_EXTRA 37 | 38 | # define MAD_PUBLISHYEAR "2000-2004" 39 | # define MAD_AUTHOR "Underbit Technologies, Inc." 40 | # define MAD_EMAIL "info@underbit.com" 41 | 42 | extern char const mad_version[]; 43 | extern char const mad_copyright[]; 44 | extern char const mad_author[]; 45 | extern char const mad_build[]; 46 | 47 | # endif 48 | -------------------------------------------------------------------------------- /components/mad/mpg12/layer12.h: -------------------------------------------------------------------------------- 1 | /* 2 | * libmad - MPEG audio decoder library 3 | * Copyright (C) 2000-2004 Underbit Technologies, Inc. 4 | * 5 | * This program is free software; you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation; either version 2 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program; if not, write to the Free Software 17 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 18 | * 19 | * $Id: layer12.h,v 1.10 2004/01/23 09:41:32 rob Exp $ 20 | */ 21 | 22 | # ifndef LIBMAD_LAYER12_H 23 | # define LIBMAD_LAYER12_H 24 | 25 | # include "stream.h" 26 | # include "frame.h" 27 | 28 | int mad_layer_I(struct mad_stream *, struct mad_frame *); 29 | int mad_layer_II(struct mad_stream *, struct mad_frame *); 30 | 31 | # endif 32 | -------------------------------------------------------------------------------- /components/mad/mpg12/readme.txt: -------------------------------------------------------------------------------- 1 | Because of size constraints, the option to read mpg1/2 files has been 2 | disabled. -------------------------------------------------------------------------------- /components/mad/version.c: -------------------------------------------------------------------------------- 1 | /* 2 | * libmad - MPEG audio decoder library 3 | * Copyright (C) 2000-2004 Underbit Technologies, Inc. 4 | * 5 | * This program is free software; you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation; either version 2 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program; if not, write to the Free Software 17 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 18 | * 19 | * $Id: version.c,v 1.15 2004/01/23 09:41:33 rob Exp $ 20 | */ 21 | 22 | # ifdef HAVE_CONFIG_H 23 | # include "config.h" 24 | # endif 25 | 26 | # include "global.h" 27 | 28 | # include "version.h" 29 | 30 | char const mad_version[] = "MPEG Audio Decoder " MAD_VERSION; 31 | char const mad_copyright[] = "Copyright (C) " MAD_PUBLISHYEAR " " MAD_AUTHOR; 32 | char const mad_author[] = MAD_AUTHOR " <" MAD_EMAIL ">"; 33 | 34 | char const mad_build[] = "" 35 | # if defined(DEBUG) 36 | "DEBUG " 37 | # elif defined(NDEBUG) 38 | "NDEBUG " 39 | # endif 40 | 41 | # if defined(EXPERIMENTAL) 42 | "EXPERIMENTAL " 43 | # endif 44 | 45 | # if defined(FPM_64BIT) 46 | "FPM_64BIT " 47 | # elif defined(FPM_INTEL) 48 | "FPM_INTEL " 49 | # elif defined(FPM_ARM) 50 | "FPM_ARM " 51 | # elif defined(FPM_MIPS) 52 | "FPM_MIPS " 53 | # elif defined(FPM_SPARC) 54 | "FPM_SPARC " 55 | # elif defined(FPM_PPC) 56 | "FPM_PPC " 57 | # elif defined(FPM_DEFAULT) 58 | "FPM_DEFAULT " 59 | # endif 60 | 61 | # if defined(ASO_IMDCT) 62 | "ASO_IMDCT " 63 | # endif 64 | # if defined(ASO_INTERLEAVE1) 65 | "ASO_INTERLEAVE1 " 66 | # endif 67 | # if defined(ASO_INTERLEAVE2) 68 | "ASO_INTERLEAVE2 " 69 | # endif 70 | # if defined(ASO_ZEROCHECK) 71 | "ASO_ZEROCHECK " 72 | # endif 73 | 74 | # if defined(OPT_SPEED) 75 | "OPT_SPEED " 76 | # elif defined(OPT_ACCURACY) 77 | "OPT_ACCURACY " 78 | # endif 79 | 80 | # if defined(OPT_SSO) 81 | "OPT_SSO " 82 | # endif 83 | 84 | # if defined(OPT_DCTO) /* never defined here */ 85 | "OPT_DCTO " 86 | # endif 87 | 88 | # if defined(OPT_STRICT) 89 | "OPT_STRICT " 90 | # endif 91 | ; 92 | -------------------------------------------------------------------------------- /components/speex/AUTHORS: -------------------------------------------------------------------------------- 1 | Jean-Marc Valin 2 | All the code except the following 3 | 4 | David Rowe 5 | lsp.c lsp.h 6 | Also ideas and feedback 7 | 8 | John Francis Edwards 9 | wave_out.[ch], some #ifdefs for windows port and MSVC project files 10 | 11 | Segher Boessenkool 12 | Misc. optimizations (for QMF in particular) 13 | 14 | Atsuhiko Yamanaka : 15 | Patch to speexenc.c to add Vorbis comment format 16 | 17 | Radim Kolar : 18 | Patch to speexenc.c for supporting more input formats 19 | -------------------------------------------------------------------------------- /components/speex/COPYING: -------------------------------------------------------------------------------- 1 | Copyright 2002-2008 Xiph.org Foundation 2 | Copyright 2002-2008 Jean-Marc Valin 3 | Copyright 2005-2007 Analog Devices Inc. 4 | Copyright 2005-2008 Commonwealth Scientific and Industrial Research 5 | Organisation (CSIRO) 6 | Copyright 1993, 2002, 2006 David Rowe 7 | Copyright 2003 EpicGames 8 | Copyright 1992-1994 Jutta Degener, Carsten Bormann 9 | 10 | Redistribution and use in source and binary forms, with or without 11 | modification, are permitted provided that the following conditions 12 | are met: 13 | 14 | - Redistributions of source code must retain the above copyright 15 | notice, this list of conditions and the following disclaimer. 16 | 17 | - Redistributions in binary form must reproduce the above copyright 18 | notice, this list of conditions and the following disclaimer in the 19 | documentation and/or other materials provided with the distribution. 20 | 21 | - Neither the name of the Xiph.org Foundation nor the names of its 22 | contributors may be used to endorse or promote products derived from 23 | this software without specific prior written permission. 24 | 25 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 26 | ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 27 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 28 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR 29 | CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 30 | EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 31 | PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 32 | PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 33 | LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 34 | NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 35 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 36 | -------------------------------------------------------------------------------- /components/speex/ChangeLog: -------------------------------------------------------------------------------- 1 | 2005-09-07 Thomas Vander Stichele 2 | 3 | * libspeex/cb_search.c: (split_cb_search_shape_sign_N1): 4 | add declaration for n, seems like an obvious build fix, slap 5 | me down if it's not 6 | 7 | 2004-02-18 Jean-Marc Valin 8 | Patch for compiling with mingw32 sent by j@thing.net 9 | 10 | 2004-02-18 Jean-Marc Valin 11 | Integrated IRIX patch (getopt stuff) from Michael Pruett 12 | 13 | 2004-02-18 Jean-Marc Valin 14 | Changed the Makefile.am so that KDevelop can parse SUBDIRS correctly 15 | 16 | 2002/03/27 Jean-Marc Valin: 17 | Working encoder and decoder for both narrowband and wideband. 18 | 19 | 2002/02/27 Jean-Marc Valin: 20 | Got the basic encoder working as a demo with quantization only on some 21 | parameters. 22 | -------------------------------------------------------------------------------- /components/speex/INSTALL: -------------------------------------------------------------------------------- 1 | Installing Speex is as easy as: 2 | 3 | % ./configure [--prefix=] 4 | % make 5 | % make install 6 | 7 | Note that if you are using the code from Git, you will need to run "autogen.sh" 8 | and then "configure". 9 | -------------------------------------------------------------------------------- /components/speex/Makefile.am: -------------------------------------------------------------------------------- 1 | ## Process this file with automake to produce Makefile.in. -*-Makefile-*- 2 | 3 | # To disable automatic dependency tracking if using other tools than 4 | # gcc and gmake, add the option 'no-dependencies' 5 | AUTOMAKE_OPTIONS = 1.8 6 | ACLOCAL_AMFLAGS = -I m4 7 | 8 | m4datadir = $(datadir)/aclocal 9 | m4data_DATA = speex.m4 10 | 11 | pkgconfigdir = $(libdir)/pkgconfig 12 | pkgconfig_DATA = speex.pc 13 | 14 | EXTRA_DIST = Speex.spec Speex.spec.in Speex.kdevelop speex.m4 speex.pc.in README.blackfin README.symbian README.TI-DSP 15 | 16 | #Fools KDevelop into including all files 17 | SUBDIRS = libspeex include doc win32 symbian ti 18 | 19 | if BUILD_BINARIES 20 | SUBDIRS += src 21 | endif 22 | 23 | DIST_SUBDIRS = libspeex include src doc win32 symbian ti 24 | 25 | rpm: dist 26 | rpmbuild -ta ${PACKAGE}-${VERSION}.tar.gz 27 | -------------------------------------------------------------------------------- /components/speex/NEWS: -------------------------------------------------------------------------------- 1 | 2002/02/13: Creation of the "Speex" project 2 | -------------------------------------------------------------------------------- /components/speex/README: -------------------------------------------------------------------------------- 1 | See INSTALL file for instruction on how to install Speex. 2 | 3 | The Speex is a patent-free, Open Source/Free Software voice codec. Unlike other codecs like MP3 and Ogg Vorbis, Speex is designed to compress voice at bitrates in the 2-45 kbps range. Possible applications include VoIP, internet audio streaming, archiving of speech data (e.g. voice mail), and audio books. In some sense, it is meant to be complementary to the Ogg Vorbis codec. 4 | 5 | To use the Speex command line tools: 6 | 7 | % speexenc [options] input_file.wav compressed_file.spx 8 | 9 | % speexdec [options] compressed_file.spx output_file.wav 10 | -------------------------------------------------------------------------------- /components/speex/README.blackfin: -------------------------------------------------------------------------------- 1 | Speex has been ported to the Blackfin DSP, for the STAMP development board. 2 | 3 | This port has been tested on the STAMP development board and requires the 4 | toolchain available at http://blackfin.uclinux.org/ 5 | 6 | 1/ In order to cross-compile for uClinux from the Speex tarball: 7 | 8 | ./configure --enable-blackfin-asm --enable-fixed-point --host=bfin-uclinux 9 | cd libspeex 10 | make 11 | 12 | The --enable-blackfin-asm option is not required, but it speeds up Speex by 13 | approximately a factor of two. 14 | 15 | 2/ In order to cross-compile for uClinux from the Speex Git: 16 | 17 | git clone git://git.xiph.org/speex.git 18 | cd speex 19 | ./autogen.sh --enable-blackfin-asm --enable-fixed-point --host=bfin-uclinux 20 | cd libspeex 21 | make 22 | -------------------------------------------------------------------------------- /components/speex/README.symbian: -------------------------------------------------------------------------------- 1 | Using Speex on Symbian OS 2 | Conrad Parker and Colin Ward, CSIRO Australia, July 2004 3 | 4 | 5 | Introduction 6 | ------------ 7 | 8 | The symbian/ directory contains the following files for Symbian's abuild tool: 9 | 10 | bld.inf Component definition file 11 | speex.mmp Project specification file 12 | config.h Configuration options for both emulator and device builds 13 | 14 | 15 | Developing applications for libspeex for Symbian OS 16 | --------------------------------------------------- 17 | 18 | Any references to the statically defined SpeexMode structures must be 19 | replaced by a call to a speex_lib_get_mode () for that mode. 20 | 21 | * References to the statically defined array speex_mode_list[modeID] 22 | must be replaced by a call to speex_lib_get_mode (modeID): 23 | 24 | - mode = speex_mode_list[modeID]; 25 | + mode = speex_lib_get_mode (modeID); 26 | 27 | * References to the statically defined mode structures must be replaced: 28 | 29 | SpeexMode * mode1, * mode2, * mode3; 30 | 31 | - mode1 = &speex_nb_mode; 32 | + mode1 = speex_lib_get_mode (SPEEX_MODEID_NB); 33 | 34 | - mode2 = &speex_wb_mode; 35 | + mode2 = speex_lib_get_mode (SPEEX_MODEID_WB); 36 | 37 | - mode3 = &speex_uwb_mode; 38 | + mode3 = speex_lib_get_mode (SPEEX_MODEID_UWB); 39 | 40 | Note that the constants SPEEX_MODEID_NB, SPEEX_MODEID_WB and 41 | SPEEX_MODEID_UWB were introduced in libspeex 1.1.6, and are 42 | defined in . speex_lib_get_mode() was introduced 43 | in libspeex 1.1.7 and is declared in . 44 | -------------------------------------------------------------------------------- /components/speex/Speex.spec: -------------------------------------------------------------------------------- 1 | %define name speex 2 | %define ver 1.2.0 3 | %define rel 1 4 | 5 | Summary: An open-source, patent-free speech codec 6 | Name: %name 7 | Version: %ver 8 | Release: %rel 9 | License: BSD 10 | Group: Application/Devel 11 | Source: http://www.speex.org/download/%{name}-%{ver}.tar.gz 12 | URL: http://www.speex.org/ 13 | Vendor: Speex 14 | Packager: Jean-Marc Valin (jean-marc.valin@usherbrooke.ca) 15 | BuildRoot: /var/tmp/%{name}-build-root 16 | Docdir: /usr/share/doc 17 | 18 | %description 19 | Speex is a patent-free audio codec designed especially for voice (unlike 20 | Vorbis which targets general audio) signals and providing good narrowband 21 | and wideband quality. This project aims to be complementary to the Vorbis 22 | codec. 23 | 24 | %package devel 25 | Summary: Speex development files 26 | Group: Development/Libraries 27 | Requires: %{name} = %{version} 28 | 29 | %description devel 30 | Speex development files. 31 | 32 | %changelog 33 | * Thu Oct 03 2002 Jean-Marc Valin 34 | - Added devel package inspired from PLD spec file 35 | 36 | * Tue Jul 30 2002 Fredrik Rambris 0.5.2 37 | - Added buildroot and docdir and ldconfig. Makes it builadble by non-roots 38 | and also doesn't write to actual library paths when building. 39 | 40 | %prep 41 | %setup 42 | 43 | %build 44 | export CFLAGS='-O3' 45 | ./configure --prefix=/usr --enable-shared --enable-static 46 | make 47 | 48 | %install 49 | rm -rf $RPM_BUILD_ROOT 50 | make DESTDIR=$RPM_BUILD_ROOT install 51 | 52 | %post -p /sbin/ldconfig 53 | %postun -p /sbin/ldconfig 54 | 55 | %files 56 | %defattr(644,root,root,755) 57 | %doc COPYING AUTHORS ChangeLog NEWS README 58 | %doc doc/manual.pdf 59 | /usr/share/man/man1/speexenc.1* 60 | /usr/share/man/man1/speexdec.1* 61 | %attr(755,root,root) %{_bindir}/speex* 62 | %attr(755,root,root) %{_libdir}/libspeex*.so* 63 | 64 | %files devel 65 | %defattr(644,root,root,755) 66 | %attr(755,root,root) %{_libdir}/libspeex*.la 67 | %{_includedir}/speex/speex*.h 68 | /usr/share/aclocal/speex.m4 69 | %{_libdir}/pkgconfig/speex.pc 70 | %{_libdir}/pkgconfig/speexdsp.pc 71 | %{_libdir}/libspeex*.a 72 | -------------------------------------------------------------------------------- /components/speex/Speex.spec.in: -------------------------------------------------------------------------------- 1 | %define name @PACKAGE@ 2 | %define ver @VERSION@ 3 | %define rel 1 4 | 5 | Summary: An open-source, patent-free speech codec 6 | Name: %name 7 | Version: %ver 8 | Release: %rel 9 | License: BSD 10 | Group: Application/Devel 11 | Source: http://www.speex.org/download/%{name}-%{ver}.tar.gz 12 | URL: http://www.speex.org/ 13 | Vendor: Speex 14 | Packager: Jean-Marc Valin (jean-marc.valin@usherbrooke.ca) 15 | BuildRoot: /var/tmp/%{name}-build-root 16 | Docdir: /usr/share/doc 17 | 18 | %description 19 | Speex is a patent-free audio codec designed especially for voice (unlike 20 | Vorbis which targets general audio) signals and providing good narrowband 21 | and wideband quality. This project aims to be complementary to the Vorbis 22 | codec. 23 | 24 | %package devel 25 | Summary: Speex development files 26 | Group: Development/Libraries 27 | Requires: %{name} = %{version} 28 | 29 | %description devel 30 | Speex development files. 31 | 32 | %changelog 33 | * Thu Oct 03 2002 Jean-Marc Valin 34 | - Added devel package inspired from PLD spec file 35 | 36 | * Tue Jul 30 2002 Fredrik Rambris 0.5.2 37 | - Added buildroot and docdir and ldconfig. Makes it builadble by non-roots 38 | and also doesn't write to actual library paths when building. 39 | 40 | %prep 41 | %setup 42 | 43 | %build 44 | export CFLAGS='-O3' 45 | ./configure --prefix=/usr --enable-shared --enable-static 46 | make 47 | 48 | %install 49 | rm -rf $RPM_BUILD_ROOT 50 | make DESTDIR=$RPM_BUILD_ROOT install 51 | 52 | %post -p /sbin/ldconfig 53 | %postun -p /sbin/ldconfig 54 | 55 | %files 56 | %defattr(644,root,root,755) 57 | %doc COPYING AUTHORS ChangeLog NEWS README 58 | %doc doc/manual.pdf 59 | /usr/share/man/man1/speexenc.1* 60 | /usr/share/man/man1/speexdec.1* 61 | %attr(755,root,root) %{_bindir}/speex* 62 | %attr(755,root,root) %{_libdir}/libspeex*.so* 63 | 64 | %files devel 65 | %defattr(644,root,root,755) 66 | %attr(755,root,root) %{_libdir}/libspeex*.la 67 | %{_includedir}/speex/speex*.h 68 | /usr/share/aclocal/speex.m4 69 | %{_libdir}/pkgconfig/speex.pc 70 | %{_libdir}/pkgconfig/speexdsp.pc 71 | %{_libdir}/libspeex*.a 72 | -------------------------------------------------------------------------------- /components/speex/TODO: -------------------------------------------------------------------------------- 1 | For 1.2: 2 | Major points: 3 | - Make documentation match the actual code 4 | - Stabilise all APIs (need feedback) 5 | - NaN checks? 6 | - Better error reporting 7 | - Make kiss-fft 32-bit safe 8 | 9 | Minor issues: 10 | - Fix last frame of speexenc 11 | 12 | 13 | Post 1.2: 14 | improve float<->int conversion 15 | split encoder and decoder? 16 | Merge TriMedia stuff 17 | packet dump 18 | Do VAD properly 19 | 20 | Optimisations 21 | - Add restrict in a few places? 22 | - enable 4x4 version of pitch_xcorr() at least on some archs? 23 | - use __builtin_expect() (likely()/unlikely()) 24 | 25 | Would be nice: 26 | Implement wideband split as IIR instead of QMF? 27 | 28 | Allocator override (speex_lib_ctl?) 29 | Fixed-point: 30 | - VBR 31 | 32 | Standards 33 | -Complete Speex RTP profile 34 | -MIME type registration 35 | 36 | ideas: 37 | Peelable stream (double codebook, higher bands, stereo) 38 | LPC from spectral domain 39 | -------------------------------------------------------------------------------- /components/speex/component.mk: -------------------------------------------------------------------------------- 1 | 2 | COMPONENT_ADD_INCLUDEDIRS := include 3 | COMPONENT_SRCDIRS:=libspeex 4 | CFLAGS+=-DFLOATING_POINT -DHAVE_CONFIG_H -------------------------------------------------------------------------------- /components/speex/doc/Makefile.am: -------------------------------------------------------------------------------- 1 | doc_DATA = manual.pdf 2 | 3 | EXTRA_DIST = $(doc_DATA) 4 | -------------------------------------------------------------------------------- /components/speex/doc/manual.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hry625/esp32_snow/ac761f2faab5d02a6cd359acfbc97676fb3cf219/components/speex/doc/manual.pdf -------------------------------------------------------------------------------- /components/speex/include/Makefile.am: -------------------------------------------------------------------------------- 1 | 2 | SUBDIRS = speex 3 | -------------------------------------------------------------------------------- /components/speex/include/config.h: -------------------------------------------------------------------------------- 1 | #define EXPORT -------------------------------------------------------------------------------- /components/speex/include/speex/Makefile.am: -------------------------------------------------------------------------------- 1 | # Disable automatic dependency tracking if using other tools than gcc and gmake 2 | #AUTOMAKE_OPTIONS = no-dependencies 3 | 4 | nodist_pkginclude_HEADERS = speex_config_types.h 5 | 6 | pkginclude_HEADERS = speex.h speex_bits.h speex_callbacks.h \ 7 | speex_header.h \ 8 | speex_stereo.h speex_types.h 9 | 10 | -------------------------------------------------------------------------------- /components/speex/include/speex/speex_config_types.h: -------------------------------------------------------------------------------- 1 | #ifndef __SPEEX_TYPES_H__ 2 | #define __SPEEX_TYPES_H__ 3 | 4 | // @INCLUDE_STDINT@ 5 | #include "stdint.h" 6 | // typedef @SIZE16@ spx_int16_t; 7 | // typedef @USIZE16@ spx_uint16_t; 8 | // typedef @SIZE32@ spx_int32_t; 9 | // typedef @USIZE32@ spx_uint32_t; 10 | typedef int16_t spx_int16_t; 11 | typedef uint16_t spx_uint16_t; 12 | typedef int32_t spx_int32_t; 13 | typedef uint32_t spx_uint32_t; 14 | #endif 15 | 16 | -------------------------------------------------------------------------------- /components/speex/libspeex/Makefile.am: -------------------------------------------------------------------------------- 1 | # Disable automatic dependency tracking if using other tools than gcc and gmake 2 | #AUTOMAKE_OPTIONS = no-dependencies 3 | 4 | if BUILD_VORBIS_PSY 5 | VPSY_SOURCE=vorbis_psy.c 6 | if BUILD_KISS_FFT 7 | FFTSRC=kiss_fft.c _kiss_fft_guts.h kiss_fft.h kiss_fftr.c kiss_fftr.h 8 | else 9 | if BUILD_SMALLFT 10 | FFTSRC=smallft.c 11 | else 12 | FFTSRC= 13 | endif 14 | endif 15 | else 16 | VPSY_SOURCE= 17 | FFTSRC= 18 | endif 19 | 20 | AM_CPPFLAGS = -I$(top_srcdir)/include -I$(top_builddir)/include/speex -I$(top_builddir) @OGG_CFLAGS@ @FFT_CFLAGS@ 21 | 22 | lib_LTLIBRARIES = libspeex.la 23 | 24 | # Sources for compilation in the library 25 | libspeex_la_SOURCES = $(VPSY_SOURCE) $(FFTSRC) cb_search.c exc_10_32_table.c exc_8_128_table.c \ 26 | filters.c gain_table.c hexc_table.c high_lsp_tables.c lsp.c \ 27 | ltp.c speex.c stereo.c vbr.c vq.c bits.c exc_10_16_table.c \ 28 | exc_20_32_table.c exc_5_256_table.c exc_5_64_table.c gain_table_lbr.c hexc_10_32_table.c \ 29 | lpc.c lsp_tables_nb.c modes.c modes_wb.c nb_celp.c quant_lsp.c sb_celp.c \ 30 | speex_callbacks.c speex_header.c window.c 31 | 32 | 33 | noinst_HEADERS = arch.h bfin.h cb_search_arm4.h cb_search_bfin.h cb_search_sse.h \ 34 | filters.h filters_arm4.h filters_bfin.h filters_sse.h fixed_arm4.h \ 35 | fixed_arm5e.h fixed_bfin.h fixed_debug.h lpc.h lpc_bfin.h ltp.h ltp_arm4.h \ 36 | ltp_sse.h math_approx.h misc_bfin.h nb_celp.h quant_lsp.h sb_celp.h \ 37 | stack_alloc.h vbr.h vq.h vq_arm4.h vq_bfin.h vq_sse.h cb_search.h fftwrap.h \ 38 | fixed_generic.h lsp.h lsp_bfin.h ltp_bfin.h modes.h os_support.h \ 39 | quant_lsp_bfin.h smallft.h vorbis_psy.h 40 | 41 | 42 | libspeex_la_LDFLAGS = -no-undefined -version-info @SPEEX_LT_CURRENT@:@SPEEX_LT_REVISION@:@SPEEX_LT_AGE@ 43 | libspeex_la_LIBADD = $(LIBM) 44 | 45 | if BUILD_BINARIES 46 | noinst_PROGRAMS = testenc testenc_wb testenc_uwb 47 | testenc_SOURCES = testenc.c 48 | testenc_LDADD = libspeex.la $(LIBM) 49 | testenc_wb_SOURCES = testenc_wb.c 50 | testenc_wb_LDADD = libspeex.la $(LIBM) 51 | testenc_uwb_SOURCES = testenc_uwb.c 52 | testenc_uwb_LDADD = libspeex.la $(LIBM) 53 | endif 54 | -------------------------------------------------------------------------------- /components/speex/libspeex/bfin.h: -------------------------------------------------------------------------------- 1 | /* Common Blackfin assembly defines 2 | * 3 | * Copyright (C) 2005-2009 Analog Devices 4 | */ 5 | 6 | #if __GNUC__ <= 3 7 | /* GCC-3.4 and older did not use hardware loops and thus did not have 8 | * register constraints for declaring clobbers. 9 | */ 10 | # define BFIN_HWLOOP0_REGS 11 | # define BFIN_HWLOOP1_REGS 12 | #else 13 | # define BFIN_HWLOOP0_REGS , "LB0", "LT0", "LC0" 14 | # define BFIN_HWLOOP1_REGS , "LB1", "LT1", "LC1" 15 | #endif 16 | -------------------------------------------------------------------------------- /components/speex/libspeex/exc_10_16_table.c: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2002 Jean-Marc Valin 2 | File: exc_10_16_table.c 3 | Codebook for excitation in narrowband CELP mode (3200 bps) 4 | 5 | Redistribution and use in source and binary forms, with or without 6 | modification, are permitted provided that the following conditions 7 | are met: 8 | 9 | - Redistributions of source code must retain the above copyright 10 | notice, this list of conditions and the following disclaimer. 11 | 12 | - Redistributions in binary form must reproduce the above copyright 13 | notice, this list of conditions and the following disclaimer in the 14 | documentation and/or other materials provided with the distribution. 15 | 16 | - Neither the name of the Xiph.org Foundation nor the names of its 17 | contributors may be used to endorse or promote products derived from 18 | this software without specific prior written permission. 19 | 20 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 21 | ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 22 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 23 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR 24 | CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 25 | EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 26 | PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 27 | PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 28 | LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 29 | NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 30 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 31 | */ 32 | 33 | 34 | const signed char exc_10_16_table[160] = { 35 | 22,39,14,44,11,35,-2,23,-4,6, 36 | 46,-28,13,-27,-23,12,4,20,-5,9, 37 | 37,-18,-23,23,0,9,-6,-20,4,-1, 38 | -17,-5,-4,17,0,1,9,-2,1,2, 39 | 2,-12,8,-25,39,15,9,16,-55,-11, 40 | 9,11,5,10,-2,-60,8,13,-6,11, 41 | -16,27,-47,-12,11,1,16,-7,9,-3, 42 | -29,9,-14,25,-19,34,36,12,40,-10, 43 | -3,-24,-14,-37,-21,-35,-2,-36,3,-6, 44 | 67,28,6,-17,-3,-12,-16,-15,-17,-7, 45 | -59,-36,-13,1,7,1,2,10,2,11, 46 | 13,10,8,-2,7,3,5,4,2,2, 47 | -3,-8,4,-5,6,7,-42,15,35,-2, 48 | -46,38,28,-20,-9,1,7,-3,0,-2, 49 | 0,0,0,0,0,0,0,0,0,0, 50 | -15,-28,52,32,5,-5,-17,-20,-10,-1}; 51 | -------------------------------------------------------------------------------- /components/speex/libspeex/exc_10_32_table.c: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2002 Jean-Marc Valin 2 | File: exc_10_32_table.c 3 | Codebook for excitation in narrowband CELP mode (4000 bps) 4 | 5 | Redistribution and use in source and binary forms, with or without 6 | modification, are permitted provided that the following conditions 7 | are met: 8 | 9 | - Redistributions of source code must retain the above copyright 10 | notice, this list of conditions and the following disclaimer. 11 | 12 | - Redistributions in binary form must reproduce the above copyright 13 | notice, this list of conditions and the following disclaimer in the 14 | documentation and/or other materials provided with the distribution. 15 | 16 | - Neither the name of the Xiph.org Foundation nor the names of its 17 | contributors may be used to endorse or promote products derived from 18 | this software without specific prior written permission. 19 | 20 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 21 | ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 22 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 23 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR 24 | CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 25 | EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 26 | PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 27 | PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 28 | LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 29 | NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 30 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 31 | */ 32 | 33 | 34 | const signed char exc_10_32_table[320] = { 35 | 7,17,17,27,25,22,12,4,-3,0, 36 | 28,-36,39,-24,-15,3,-9,15,-5,10, 37 | 31,-28,11,31,-21,9,-11,-11,-2,-7, 38 | -25,14,-22,31,4,-14,19,-12,14,-5, 39 | 4,-7,4,-5,9,0,-2,42,-47,-16, 40 | 1,8,0,9,23,-57,0,28,-11,6, 41 | -31,55,-45,3,-5,4,2,-2,4,-7, 42 | -3,6,-2,7,-3,12,5,8,54,-10, 43 | 8,-7,-8,-24,-25,-27,-14,-5,8,5, 44 | 44,23,5,-9,-11,-11,-13,-9,-12,-8, 45 | -29,-8,-22,6,-15,3,-12,-1,-5,-3, 46 | 34,-1,29,-16,17,-4,12,2,1,4, 47 | -2,-4,2,-1,11,-3,-52,28,30,-9, 48 | -32,25,44,-20,-24,4,6,-1,0,0, 49 | 0,0,0,0,0,0,0,0,0,0, 50 | -25,-10,22,29,13,-13,-22,-13,-4,0, 51 | -4,-16,10,15,-36,-24,28,25,-1,-3, 52 | 66,-33,-11,-15,6,0,3,4,-2,5, 53 | 24,-20,-47,29,19,-2,-4,-1,0,-1, 54 | -2,3,1,8,-11,5,5,-57,28,28, 55 | 0,-16,4,-4,12,-6,-1,2,-20,61, 56 | -9,24,-22,-42,29,6,17,8,4,2, 57 | -65,15,8,10,5,6,5,3,2,-2, 58 | -3,5,-9,4,-5,23,13,23,-3,-63, 59 | 3,-5,-4,-6,0,-3,23,-36,-46,9, 60 | 5,5,8,4,9,-5,1,-3,10,1, 61 | -6,10,-11,24,-47,31,22,-12,14,-10, 62 | 6,11,-7,-7,7,-31,51,-12,-6,7, 63 | 6,-17,9,-11,-20,52,-19,3,-6,-6, 64 | -8,-5,23,-41,37,1,-21,10,-14,8, 65 | 7,5,-15,-15,23,39,-26,-33,7,2, 66 | -32,-30,-21,-8,4,12,17,15,14,11}; 67 | -------------------------------------------------------------------------------- /components/speex/libspeex/exc_5_64_table.c: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2002 Jean-Marc Valin 2 | File: exc_5_64_table.c 3 | Codebook for excitation in narrowband CELP mode (9600 bps) 4 | 5 | Redistribution and use in source and binary forms, with or without 6 | modification, are permitted provided that the following conditions 7 | are met: 8 | 9 | - Redistributions of source code must retain the above copyright 10 | notice, this list of conditions and the following disclaimer. 11 | 12 | - Redistributions in binary form must reproduce the above copyright 13 | notice, this list of conditions and the following disclaimer in the 14 | documentation and/or other materials provided with the distribution. 15 | 16 | - Neither the name of the Xiph.org Foundation nor the names of its 17 | contributors may be used to endorse or promote products derived from 18 | this software without specific prior written permission. 19 | 20 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 21 | ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 22 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 23 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR 24 | CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 25 | EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 26 | PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 27 | PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 28 | LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 29 | NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 30 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 31 | */ 32 | 33 | 34 | const signed char exc_5_64_table[320]={ 35 | 1,5,-15,49,-66, 36 | -48,-4,50,-44,7, 37 | 37,16,-18,25,-26, 38 | -26,-15,19,19,-27, 39 | -47,28,57,5,-17, 40 | -32,-41,68,21,-2, 41 | 64,56,8,-16,-13, 42 | -26,-9,-16,11,6, 43 | -39,25,-19,22,-31, 44 | 20,-45,55,-43,10, 45 | -16,47,-40,40,-20, 46 | -51,3,-17,-14,-15, 47 | -24,53,-20,-46,46, 48 | 27,-68,32,3,-18, 49 | -5,9,-31,16,-9, 50 | -10,-1,-23,48,95, 51 | 47,25,-41,-32,-3, 52 | 15,-25,-55,36,41, 53 | -27,20,5,13,14, 54 | -22,5,2,-23,18, 55 | 46,-15,17,-18,-34, 56 | -5,-8,27,-55,73, 57 | 16,2,-1,-17,40, 58 | -78,33,0,2,19, 59 | 4,53,-16,-15,-16, 60 | -28,-3,-13,49,8, 61 | -7,-29,27,-13,32, 62 | 20,32,-61,16,14, 63 | 41,44,40,24,20, 64 | 7,4,48,-60,-77, 65 | 17,-6,-48,65,-15, 66 | 32,-30,-71,-10,-3, 67 | -6,10,-2,-7,-29, 68 | -56,67,-30,7,-5, 69 | 86,-6,-10,0,5, 70 | -31,60,34,-38,-3, 71 | 24,10,-2,30,23, 72 | 24,-41,12,70,-43, 73 | 15,-17,6,13,16, 74 | -13,8,30,-15,-8, 75 | 5,23,-34,-98,-4, 76 | -13,13,-48,-31,70, 77 | 12,31,25,24,-24, 78 | 26,-7,33,-16,8, 79 | 5,-11,-14,-8,-65, 80 | 13,10,-2,-9,0, 81 | -3,-68,5,35,7, 82 | 0,-31,-1,-17,-9, 83 | -9,16,-37,-18,-1, 84 | 69,-48,-28,22,-21, 85 | -11,5,49,55,23, 86 | -86,-36,16,2,13, 87 | 63,-51,30,-11,13, 88 | 24,-18,-6,14,-19, 89 | 1,41,9,-5,27, 90 | -36,-44,-34,-37,-21, 91 | -26,31,-39,15,43, 92 | 5,-8,29,20,-8, 93 | -20,-52,-28,-1,13, 94 | 26,-34,-10,-9,27, 95 | -8,8,27,-66,4, 96 | 12,-22,49,10,-77, 97 | 32,-18,3,-38,12, 98 | -3,-1,2,2,0}; 99 | -------------------------------------------------------------------------------- /components/speex/libspeex/fftwrap.h: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2005 Jean-Marc Valin 2 | File: fftwrap.h 3 | 4 | Wrapper for various FFTs 5 | 6 | Redistribution and use in source and binary forms, with or without 7 | modification, are permitted provided that the following conditions 8 | are met: 9 | 10 | - Redistributions of source code must retain the above copyright 11 | notice, this list of conditions and the following disclaimer. 12 | 13 | - Redistributions in binary form must reproduce the above copyright 14 | notice, this list of conditions and the following disclaimer in the 15 | documentation and/or other materials provided with the distribution. 16 | 17 | - Neither the name of the Xiph.org Foundation nor the names of its 18 | contributors may be used to endorse or promote products derived from 19 | this software without specific prior written permission. 20 | 21 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 22 | ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 23 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 24 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR 25 | CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 26 | EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 27 | PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 28 | PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 29 | LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 30 | NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 31 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 32 | 33 | */ 34 | 35 | #ifndef FFTWRAP_H 36 | #define FFTWRAP_H 37 | 38 | #include "arch.h" 39 | 40 | /** Compute tables for an FFT */ 41 | void *spx_fft_init(int size); 42 | 43 | /** Destroy tables for an FFT */ 44 | void spx_fft_destroy(void *table); 45 | 46 | /** Forward (real to half-complex) transform */ 47 | void spx_fft(void *table, spx_word16_t *in, spx_word16_t *out); 48 | 49 | /** Backward (half-complex to real) transform */ 50 | void spx_ifft(void *table, spx_word16_t *in, spx_word16_t *out); 51 | 52 | /** Forward (real to half-complex) transform of float data */ 53 | void spx_fft_float(void *table, float *in, float *out); 54 | 55 | /** Backward (half-complex to real) transform of float data */ 56 | void spx_ifft_float(void *table, float *in, float *out); 57 | 58 | #endif 59 | -------------------------------------------------------------------------------- /components/speex/libspeex/gain_table_lbr.c: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2002 Jean-Marc Valin 2 | File: gain_table_lbr.c 3 | Codebook for 3-tap pitch prediction gain (32 entries) 4 | 5 | Redistribution and use in source and binary forms, with or without 6 | modification, are permitted provided that the following conditions are 7 | met: 8 | 9 | 1. Redistributions of source code must retain the above copyright notice, 10 | this list of conditions and the following disclaimer. 11 | 12 | 2. Redistributions in binary form must reproduce the above copyright 13 | notice, this list of conditions and the following disclaimer in the 14 | documentation and/or other materials provided with the distribution. 15 | 16 | 3. The name of the author may not be used to endorse or promote products 17 | derived from this software without specific prior written permission. 18 | 19 | THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 20 | IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 21 | OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 22 | DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, 23 | INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 24 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 25 | SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 26 | HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, 27 | STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN 28 | ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 29 | POSSIBILITY OF SUCH DAMAGE. 30 | */ 31 | 32 | const signed char gain_cdbk_lbr[128] = { 33 | -32, -32, -32, 0, 34 | -31, -58, -16, 22, 35 | -41, -24, -43, 14, 36 | -56, -22, -55, 29, 37 | -13, 33, -41, 47, 38 | -4, -39, -9, 29, 39 | -41, 15, -12, 38, 40 | -8, -15, -12, 31, 41 | 1, 2, -44, 40, 42 | -22, -66, -42, 27, 43 | -38, 28, -23, 38, 44 | -21, 14, -37, 31, 45 | 0, 21, -50, 52, 46 | -53, -71, -27, 33, 47 | -37, -1, -19, 25, 48 | -19, -5, -28, 22, 49 | 6, 65, -44, 74, 50 | -33, -48, -33, 9, 51 | -40, 57, -14, 58, 52 | -17, 4, -45, 32, 53 | -31, 38, -33, 36, 54 | -23, 28, -40, 39, 55 | -43, 29, -12, 46, 56 | -34, 13, -23, 28, 57 | -16, 15, -27, 34, 58 | -14, -82, -15, 43, 59 | -31, 25, -32, 29, 60 | -21, 5, -5, 38, 61 | -47, -63, -51, 33, 62 | -46, 12, 3, 47, 63 | -28, -17, -29, 11, 64 | -10, 14, -40, 38}; 65 | -------------------------------------------------------------------------------- /components/speex/libspeex/hexc_10_32_table.c: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2002 Jean-Marc Valin 2 | File: hexc_10_32_table.c 3 | Codebook for high-band excitation in SB-CELP mode (4000 bps) 4 | 5 | Redistribution and use in source and binary forms, with or without 6 | modification, are permitted provided that the following conditions 7 | are met: 8 | 9 | - Redistributions of source code must retain the above copyright 10 | notice, this list of conditions and the following disclaimer. 11 | 12 | - Redistributions in binary form must reproduce the above copyright 13 | notice, this list of conditions and the following disclaimer in the 14 | documentation and/or other materials provided with the distribution. 15 | 16 | - Neither the name of the Xiph.org Foundation nor the names of its 17 | contributors may be used to endorse or promote products derived from 18 | this software without specific prior written permission. 19 | 20 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 21 | ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 22 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 23 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR 24 | CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 25 | EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 26 | PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 27 | PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 28 | LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 29 | NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 30 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 31 | */ 32 | 33 | const signed char hexc_10_32_table[320] = { 34 | -3, -2, -1, 0, -4, 5, 35, -40, -9, 13, 35 | -44, 5, -27, -1, -7, 6, -11, 7, -8, 7, 36 | 19, -14, 15, -4, 9, -10, 10, -8, 10, -9, 37 | -1, 1, 0, 0, 2, 5, -18, 22, -53, 50, 38 | 1, -23, 50, -36, 15, 3, -13, 14, -10, 6, 39 | 1, 5, -3, 4, -2, 5, -32, 25, 5, -2, 40 | -1, -4, 1, 11, -29, 26, -6, -15, 30, -18, 41 | 0, 15, -17, 40, -41, 3, 9, -2, -2, 3, 42 | -3, -1, -5, 2, 21, -6, -16, -21, 23, 2, 43 | 60, 15, 16, -16, -9, 14, 9, -1, 7, -9, 44 | 0, 1, 1, 0, -1, -6, 17, -28, 54, -45, 45 | -1, 1, -1, -6, -6, 2, 11, 26, -29, -2, 46 | 46, -21, 34, 12, -23, 32, -23, 16, -10, 3, 47 | 66, 19, -20, 24, 7, 11, -3, 0, -3, -1, 48 | -50, -46, 2, -18, -3, 4, -1, -2, 3, -3, 49 | -19, 41, -36, 9, 11, -24, 21, -16, 9, -3, 50 | -25, -3, 10, 18, -9, -2, -5, -1, -5, 6, 51 | -4, -3, 2, -26, 21, -19, 35, -15, 7, -13, 52 | 17, -19, 39, -43, 48, -31, 16, -9, 7, -2, 53 | -5, 3, -4, 9, -19, 27, -55, 63, -35, 10, 54 | 26, -44, -2, 9, 4, 1, -6, 8, -9, 5, 55 | -8, -1, -3, -16, 45, -42, 5, 15, -16, 10, 56 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 57 | -16, 24, -55, 47, -38, 27, -19, 7, -3, 1, 58 | 16, 27, 20, -19, 18, 5, -7, 1, -5, 2, 59 | -6, 8, -22, 0, -3, -3, 8, -1, 7, -8, 60 | 1, -3, 5, 0, 17, -48, 58, -52, 29, -7, 61 | -2, 3, -10, 6, -26, 58, -31, 1, -6, 3, 62 | 93, -29, 39, 3, 17, 5, 6, -1, -1, -1, 63 | 27, 13, 10, 19, -7, -34, 12, 10, -4, 9, 64 | -76, 9, 8, -28, -2, -11, 2, -1, 3, 1, 65 | -83, 38, -39, 4, -16, -6, -2, -5, 5, -2, 66 | }; 67 | -------------------------------------------------------------------------------- /components/speex/libspeex/kiss_fftr.h: -------------------------------------------------------------------------------- 1 | #ifndef KISS_FTR_H 2 | #define KISS_FTR_H 3 | 4 | #include "kiss_fft.h" 5 | #ifdef __cplusplus 6 | extern "C" { 7 | #endif 8 | 9 | 10 | /* 11 | 12 | Real optimized version can save about 45% cpu time vs. complex fft of a real seq. 13 | 14 | 15 | 16 | */ 17 | 18 | typedef struct kiss_fftr_state *kiss_fftr_cfg; 19 | 20 | 21 | kiss_fftr_cfg kiss_fftr_alloc(int nfft,int inverse_fft,void * mem, size_t * lenmem); 22 | /* 23 | nfft must be even 24 | 25 | If you don't care to allocate space, use mem = lenmem = NULL 26 | */ 27 | 28 | 29 | void kiss_fftr(kiss_fftr_cfg cfg,const kiss_fft_scalar *timedata,kiss_fft_cpx *freqdata); 30 | /* 31 | input timedata has nfft scalar points 32 | output freqdata has nfft/2+1 complex points 33 | */ 34 | 35 | void kiss_fftr2(kiss_fftr_cfg st,const kiss_fft_scalar *timedata,kiss_fft_scalar *freqdata); 36 | 37 | void kiss_fftri(kiss_fftr_cfg cfg,const kiss_fft_cpx *freqdata,kiss_fft_scalar *timedata); 38 | 39 | void kiss_fftri2(kiss_fftr_cfg st,const kiss_fft_scalar *freqdata, kiss_fft_scalar *timedata); 40 | 41 | /* 42 | input freqdata has nfft/2+1 complex points 43 | output timedata has nfft scalar points 44 | */ 45 | 46 | #define kiss_fftr_free speex_free 47 | 48 | #ifdef __cplusplus 49 | } 50 | #endif 51 | #endif 52 | -------------------------------------------------------------------------------- /components/speex/libspeex/lpc.h: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2002 Jean-Marc Valin */ 2 | /** 3 | @file lpc.h 4 | @brief Functions for LPC (Linear Prediction Coefficients) analysis 5 | */ 6 | /* 7 | Redistribution and use in source and binary forms, with or without 8 | modification, are permitted provided that the following conditions 9 | are met: 10 | 11 | - Redistributions of source code must retain the above copyright 12 | notice, this list of conditions and the following disclaimer. 13 | 14 | - Redistributions in binary form must reproduce the above copyright 15 | notice, this list of conditions and the following disclaimer in the 16 | documentation and/or other materials provided with the distribution. 17 | 18 | - Neither the name of the Xiph.org Foundation nor the names of its 19 | contributors may be used to endorse or promote products derived from 20 | this software without specific prior written permission. 21 | 22 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 23 | ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 24 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 25 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR 26 | CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 27 | EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 28 | PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 29 | PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 30 | LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 31 | NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 32 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 33 | */ 34 | 35 | #ifndef LPC_H 36 | #define LPC_H 37 | 38 | #include "arch.h" 39 | 40 | void _spx_autocorr( 41 | const spx_word16_t * x, /* in: [0...n-1] samples x */ 42 | spx_word16_t *ac, /* out: [0...lag-1] ac values */ 43 | int lag, int n); 44 | 45 | spx_word32_t /* returns minimum mean square error */ 46 | _spx_lpc( 47 | spx_coef_t * lpc, /* [0...p-1] LPC coefficients */ 48 | const spx_word16_t * ac, /* in: [0...p] autocorrelation values */ 49 | int p 50 | ); 51 | 52 | 53 | #endif 54 | -------------------------------------------------------------------------------- /components/speex/libspeex/lsp.h: -------------------------------------------------------------------------------- 1 | /*---------------------------------------------------------------------------*\ 2 | Original Copyright 3 | FILE........: AK2LSPD.H 4 | TYPE........: Turbo C header file 5 | COMPANY.....: Voicetronix 6 | AUTHOR......: James Whitehall 7 | DATE CREATED: 21/11/95 8 | 9 | Modified by Jean-Marc Valin 10 | 11 | This file contains functions for converting Linear Prediction 12 | Coefficients (LPC) to Line Spectral Pair (LSP) and back. Note that the 13 | LSP coefficients are not in radians format but in the x domain of the 14 | unit circle. 15 | 16 | \*---------------------------------------------------------------------------*/ 17 | /** 18 | @file lsp.h 19 | @brief Line Spectral Pair (LSP) functions. 20 | */ 21 | /* Speex License: 22 | 23 | Redistribution and use in source and binary forms, with or without 24 | modification, are permitted provided that the following conditions 25 | are met: 26 | 27 | - Redistributions of source code must retain the above copyright 28 | notice, this list of conditions and the following disclaimer. 29 | 30 | - Redistributions in binary form must reproduce the above copyright 31 | notice, this list of conditions and the following disclaimer in the 32 | documentation and/or other materials provided with the distribution. 33 | 34 | - Neither the name of the Xiph.org Foundation nor the names of its 35 | contributors may be used to endorse or promote products derived from 36 | this software without specific prior written permission. 37 | 38 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 39 | ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 40 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 41 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR 42 | CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 43 | EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 44 | PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 45 | PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 46 | LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 47 | NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 48 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 49 | */ 50 | 51 | #ifndef __AK2LSPD__ 52 | #define __AK2LSPD__ 53 | 54 | #include "arch.h" 55 | 56 | int lpc_to_lsp (spx_coef_t *a, int lpcrdr, spx_lsp_t *freq, int nb, spx_word16_t delta, char *stack); 57 | void lsp_to_lpc(const spx_lsp_t *freq, spx_coef_t *ak, int lpcrdr, char *stack); 58 | 59 | /*Added by JMV*/ 60 | void lsp_interpolate(spx_lsp_t *old_lsp, spx_lsp_t *new_lsp, spx_lsp_t *interp_lsp, int len, int subframe, int nb_subframes, spx_word16_t margin); 61 | 62 | #endif /* __AK2LSPD__ */ 63 | -------------------------------------------------------------------------------- /components/speex/libspeex/misc_bfin.h: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2005 Analog Devices */ 2 | /** 3 | @file misc_bfin.h 4 | @author Jean-Marc Valin 5 | @brief Various compatibility routines for Speex (Blackfin version) 6 | */ 7 | /* 8 | Redistribution and use in source and binary forms, with or without 9 | modification, are permitted provided that the following conditions 10 | are met: 11 | 12 | - Redistributions of source code must retain the above copyright 13 | notice, this list of conditions and the following disclaimer. 14 | 15 | - Redistributions in binary form must reproduce the above copyright 16 | notice, this list of conditions and the following disclaimer in the 17 | documentation and/or other materials provided with the distribution. 18 | 19 | - Neither the name of the Xiph.org Foundation nor the names of its 20 | contributors may be used to endorse or promote products derived from 21 | this software without specific prior written permission. 22 | 23 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 24 | ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 25 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 26 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR 27 | CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 28 | EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 29 | PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 30 | PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 31 | LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 32 | NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 33 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 34 | */ 35 | 36 | #include "bfin.h" 37 | 38 | #define OVERRIDE_SPEEX_MOVE 39 | void *speex_move (void *dest, void *src, int n) 40 | { 41 | __asm__ __volatile__ 42 | ( 43 | "L0 = 0;\n\t" 44 | "I0 = %0;\n\t" 45 | "R0 = [I0++];\n\t" 46 | "LOOP move%= LC0 = %2;\n\t" 47 | "LOOP_BEGIN move%=;\n\t" 48 | "[%1++] = R0 || R0 = [I0++];\n\t" 49 | "LOOP_END move%=;\n\t" 50 | "[%1++] = R0;\n\t" 51 | : "=a" (src), "=a" (dest) 52 | : "a" ((n>>2)-1), "0" (src), "1" (dest) 53 | : "R0", "I0", "L0", "memory" BFIN_HWLOOP0_REGS 54 | ); 55 | return dest; 56 | } 57 | -------------------------------------------------------------------------------- /components/speex/libspeex/quant_lsp.h: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2002 Jean-Marc Valin */ 2 | /** 3 | @file quant_lsp.h 4 | @brief LSP vector quantization 5 | */ 6 | /* 7 | Redistribution and use in source and binary forms, with or without 8 | modification, are permitted provided that the following conditions 9 | are met: 10 | 11 | - Redistributions of source code must retain the above copyright 12 | notice, this list of conditions and the following disclaimer. 13 | 14 | - Redistributions in binary form must reproduce the above copyright 15 | notice, this list of conditions and the following disclaimer in the 16 | documentation and/or other materials provided with the distribution. 17 | 18 | - Neither the name of the Xiph.org Foundation nor the names of its 19 | contributors may be used to endorse or promote products derived from 20 | this software without specific prior written permission. 21 | 22 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 23 | ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 24 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 25 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR 26 | CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 27 | EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 28 | PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 29 | PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 30 | LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 31 | NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 32 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 33 | */ 34 | 35 | #ifndef QUANT_LSP_H 36 | #define QUANT_LSP_H 37 | 38 | #include "speex/speex_bits.h" 39 | #include "arch.h" 40 | 41 | #define MAX_LSP_SIZE 20 42 | 43 | #define NB_CDBK_SIZE 64 44 | #define NB_CDBK_SIZE_LOW1 64 45 | #define NB_CDBK_SIZE_LOW2 64 46 | #define NB_CDBK_SIZE_HIGH1 64 47 | #define NB_CDBK_SIZE_HIGH2 64 48 | 49 | /*Narrowband codebooks*/ 50 | extern const signed char cdbk_nb[]; 51 | extern const signed char cdbk_nb_low1[]; 52 | extern const signed char cdbk_nb_low2[]; 53 | extern const signed char cdbk_nb_high1[]; 54 | extern const signed char cdbk_nb_high2[]; 55 | 56 | /* Quantizes narrowband LSPs with 30 bits */ 57 | void lsp_quant_nb(spx_lsp_t *lsp, spx_lsp_t *qlsp, int order, SpeexBits *bits); 58 | 59 | /* Decodes quantized narrowband LSPs */ 60 | void lsp_unquant_nb(spx_lsp_t *lsp, int order, SpeexBits *bits); 61 | 62 | /* Quantizes low bit-rate narrowband LSPs with 18 bits */ 63 | void lsp_quant_lbr(spx_lsp_t *lsp, spx_lsp_t *qlsp, int order, SpeexBits *bits); 64 | 65 | /* Decodes quantized low bit-rate narrowband LSPs */ 66 | void lsp_unquant_lbr(spx_lsp_t *lsp, int order, SpeexBits *bits); 67 | 68 | /* Quantizes high-band LSPs with 12 bits */ 69 | void lsp_quant_high(spx_lsp_t *lsp, spx_lsp_t *qlsp, int order, SpeexBits *bits); 70 | 71 | /* Decodes high-band LSPs */ 72 | void lsp_unquant_high(spx_lsp_t *lsp, int order, SpeexBits *bits); 73 | 74 | #endif 75 | -------------------------------------------------------------------------------- /components/speex/libspeex/smallft.h: -------------------------------------------------------------------------------- 1 | /******************************************************************** 2 | * * 3 | * THIS FILE IS PART OF THE OggVorbis SOFTWARE CODEC SOURCE CODE. * 4 | * USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS * 5 | * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE * 6 | * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. * 7 | * * 8 | * THE OggVorbis SOURCE CODE IS (C) COPYRIGHT 1994-2001 * 9 | * by the XIPHOPHORUS Company http://www.xiph.org/ * 10 | * * 11 | ******************************************************************** 12 | 13 | function: fft transform 14 | last mod: $Id: smallft.h,v 1.3 2003/09/16 18:35:45 jm Exp $ 15 | 16 | ********************************************************************/ 17 | /** 18 | @file smallft.h 19 | @brief Discrete Rotational Fourier Transform (DRFT) 20 | */ 21 | 22 | #ifndef _V_SMFT_H_ 23 | #define _V_SMFT_H_ 24 | 25 | 26 | #ifdef __cplusplus 27 | extern "C" { 28 | #endif 29 | 30 | /** Discrete Rotational Fourier Transform lookup */ 31 | struct drft_lookup{ 32 | int n; 33 | float *trigcache; 34 | int *splitcache; 35 | }; 36 | 37 | extern void spx_drft_forward(struct drft_lookup *l,float *data); 38 | extern void spx_drft_backward(struct drft_lookup *l,float *data); 39 | extern void spx_drft_init(struct drft_lookup *l,int n); 40 | extern void spx_drft_clear(struct drft_lookup *l); 41 | 42 | #ifdef __cplusplus 43 | } 44 | #endif 45 | 46 | #endif 47 | -------------------------------------------------------------------------------- /components/speex/libspeex/vbr.h: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2002 Jean-Marc Valin */ 2 | /** 3 | @file vbr.h 4 | @brief Variable Bit-Rate (VBR) related routines 5 | */ 6 | /* 7 | Redistribution and use in source and binary forms, with or without 8 | modification, are permitted provided that the following conditions 9 | are met: 10 | 11 | - Redistributions of source code must retain the above copyright 12 | notice, this list of conditions and the following disclaimer. 13 | 14 | - Redistributions in binary form must reproduce the above copyright 15 | notice, this list of conditions and the following disclaimer in the 16 | documentation and/or other materials provided with the distribution. 17 | 18 | - Neither the name of the Xiph.org Foundation nor the names of its 19 | contributors may be used to endorse or promote products derived from 20 | this software without specific prior written permission. 21 | 22 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 23 | ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 24 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 25 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR 26 | CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 27 | EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 28 | PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 29 | PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 30 | LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 31 | NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 32 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 33 | 34 | */ 35 | 36 | 37 | #ifndef VBR_H 38 | #define VBR_H 39 | 40 | #include "arch.h" 41 | 42 | #define VBR_MEMORY_SIZE 5 43 | 44 | extern const float vbr_nb_thresh[9][11]; 45 | extern const float vbr_hb_thresh[5][11]; 46 | extern const float vbr_uhb_thresh[2][11]; 47 | 48 | /** VBR state. */ 49 | typedef struct VBRState { 50 | float average_energy; 51 | float last_energy; 52 | float last_log_energy[VBR_MEMORY_SIZE]; 53 | float accum_sum; 54 | float last_pitch_coef; 55 | float soft_pitch; 56 | float last_quality; 57 | float noise_level; 58 | float noise_accum; 59 | float noise_accum_count; 60 | int consec_noise; 61 | } VBRState; 62 | 63 | void vbr_init(VBRState *vbr); 64 | 65 | float vbr_analysis(VBRState *vbr, spx_word16_t *sig, int len, int pitch, float pitch_coef); 66 | 67 | void vbr_destroy(VBRState *vbr); 68 | 69 | #endif 70 | -------------------------------------------------------------------------------- /components/speex/libspeex/vq.h: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2002 Jean-Marc Valin */ 2 | /** 3 | @file vq.h 4 | @brief Vector quantization 5 | */ 6 | /* 7 | Redistribution and use in source and binary forms, with or without 8 | modification, are permitted provided that the following conditions 9 | are met: 10 | 11 | - Redistributions of source code must retain the above copyright 12 | notice, this list of conditions and the following disclaimer. 13 | 14 | - Redistributions in binary form must reproduce the above copyright 15 | notice, this list of conditions and the following disclaimer in the 16 | documentation and/or other materials provided with the distribution. 17 | 18 | - Neither the name of the Xiph.org Foundation nor the names of its 19 | contributors may be used to endorse or promote products derived from 20 | this software without specific prior written permission. 21 | 22 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 23 | ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 24 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 25 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR 26 | CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 27 | EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 28 | PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 29 | PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 30 | LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 31 | NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 32 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 33 | */ 34 | 35 | #ifndef VQ_H 36 | #define VQ_H 37 | 38 | #include "arch.h" 39 | 40 | int scal_quant(spx_word16_t in, const spx_word16_t *boundary, int entries); 41 | int scal_quant32(spx_word32_t in, const spx_word32_t *boundary, int entries); 42 | 43 | #ifdef _USE_SSE 44 | #include 45 | void vq_nbest(spx_word16_t *in, const __m128 *codebook, int len, int entries, __m128 *E, int N, int *nbest, spx_word32_t *best_dist, char *stack); 46 | 47 | void vq_nbest_sign(spx_word16_t *in, const __m128 *codebook, int len, int entries, __m128 *E, int N, int *nbest, spx_word32_t *best_dist, char *stack); 48 | #else 49 | void vq_nbest(spx_word16_t *in, const spx_word16_t *codebook, int len, int entries, spx_word32_t *E, int N, int *nbest, spx_word32_t *best_dist, char *stack); 50 | 51 | void vq_nbest_sign(spx_word16_t *in, const spx_word16_t *codebook, int len, int entries, spx_word32_t *E, int N, int *nbest, spx_word32_t *best_dist, char *stack); 52 | #endif 53 | 54 | #endif 55 | -------------------------------------------------------------------------------- /components/speex/m4/add_cflags.m4: -------------------------------------------------------------------------------- 1 | dnl @synopsis XIPH_ADD_CFLAGS 2 | dnl 3 | dnl Add the given option to CFLAGS, if it doesn't break the compiler 4 | 5 | AC_DEFUN([XIPH_ADD_CFLAGS], 6 | [AC_MSG_CHECKING([if $CC accepts $1]) 7 | ac_add_cflags__old_cflags="$CFLAGS" 8 | CFLAGS="$1" 9 | AC_TRY_LINK([ 10 | #include 11 | ], 12 | [puts("Hello, World!"); return 0;], 13 | AC_MSG_RESULT([yes]) 14 | CFLAGS="$ac_add_cflags__old_cflags $1", 15 | AC_MSG_RESULT([no]) 16 | CFLAGS="$ac_add_cflags__old_cflags" 17 | ) 18 | ])# XIPH_ADD_CFLAGS 19 | -------------------------------------------------------------------------------- /components/speex/m4/ltversion.m4: -------------------------------------------------------------------------------- 1 | # ltversion.m4 -- version numbers -*- Autoconf -*- 2 | # 3 | # Copyright (C) 2004, 2011-2015 Free Software Foundation, Inc. 4 | # Written by Scott James Remnant, 2004 5 | # 6 | # This file is free software; the Free Software Foundation gives 7 | # unlimited permission to copy and/or distribute it, with or without 8 | # modifications, as long as this notice is preserved. 9 | 10 | # @configure_input@ 11 | 12 | # serial 4179 ltversion.m4 13 | # This file is part of GNU Libtool 14 | 15 | m4_define([LT_PACKAGE_VERSION], [2.4.6]) 16 | m4_define([LT_PACKAGE_REVISION], [2.4.6]) 17 | 18 | AC_DEFUN([LTVERSION_VERSION], 19 | [macro_version='2.4.6' 20 | macro_revision='2.4.6' 21 | _LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?]) 22 | _LT_DECL(, macro_revision, 0) 23 | ]) 24 | -------------------------------------------------------------------------------- /components/speex/speex.pc.in: -------------------------------------------------------------------------------- 1 | # libspeex pkg-config source file 2 | 3 | prefix=@prefix@ 4 | exec_prefix=@exec_prefix@ 5 | libdir=@libdir@ 6 | includedir=@includedir@ 7 | 8 | Name: speex 9 | Description: Speex is an audio codec tuned for speech 10 | Version: @SPEEX_VERSION@ 11 | Requires: 12 | Conflicts: 13 | Libs: -L${libdir} -lspeex 14 | Libs.private: @LIBM@ 15 | Cflags: -I${includedir} 16 | -------------------------------------------------------------------------------- /components/speex/symbian/Makefile.am: -------------------------------------------------------------------------------- 1 | ## Process this file with automake to produce Makefile.in. -*-Makefile-*- 2 | 3 | # Disable automatic dependency tracking if using other tools than gcc and gmake 4 | #AUTOMAKE_OPTIONS = no-dependencies 5 | 6 | EXTRA_DIST = bld.inf config.h speex.mmp 7 | -------------------------------------------------------------------------------- /components/speex/symbian/bld.inf: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 2003 Commonwealth Scientific and Industrial Research 3 | Organisation (CSIRO) Australia 4 | 5 | Redistribution and use in source and binary forms, with or without 6 | modification, are permitted provided that the following conditions 7 | are met: 8 | 9 | - Redistributions of source code must retain the above copyright 10 | notice, this list of conditions and the following disclaimer. 11 | 12 | - Redistributions in binary form must reproduce the above copyright 13 | notice, this list of conditions and the following disclaimer in the 14 | documentation and/or other materials provided with the distribution. 15 | 16 | - Neither the name of CSIRO Australia nor the names of its 17 | contributors may be used to endorse or promote products derived from 18 | this software without specific prior written permission. 19 | 20 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 21 | ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 22 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A 23 | PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE ORGANISATION OR 24 | CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 25 | EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 26 | PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 27 | PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 28 | LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 29 | NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 30 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 31 | */ 32 | 33 | PRJ_EXPORTS 34 | 35 | ..\include\speex\speex_bits.h \epoc32\include\speex\speex_bits.h 36 | ..\include\speex\speex_callbacks.h \epoc32\include\speex\speex_callbacks.h 37 | ..\include\speex\speex_config_types.h \epoc32\include\speex\speex_config_types.h 38 | ..\include\speex\speex.h \epoc32\include\speex\speex.h 39 | ..\include\speex\speex_header.h \epoc32\include\speex\speex_header.h 40 | ..\include\speex\speex_stereo.h \epoc32\include\speex\speex_stereo.h 41 | ..\include\speex\speex_types.h \epoc32\include\speex\speex_types.h 42 | 43 | 44 | PRJ_MMPFILES 45 | 46 | speex.mmp 47 | -------------------------------------------------------------------------------- /components/speex/symbian/config.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 2003 Commonwealth Scientific and Industrial Research 3 | Organisation (CSIRO) Australia 4 | 5 | Redistribution and use in source and binary forms, with or without 6 | modification, are permitted provided that the following conditions 7 | are met: 8 | 9 | - Redistributions of source code must retain the above copyright 10 | notice, this list of conditions and the following disclaimer. 11 | 12 | - Redistributions in binary form must reproduce the above copyright 13 | notice, this list of conditions and the following disclaimer in the 14 | documentation and/or other materials provided with the distribution. 15 | 16 | - Neither the name of CSIRO Australia nor the names of its 17 | contributors may be used to endorse or promote products derived from 18 | this software without specific prior written permission. 19 | 20 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 21 | ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 22 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A 23 | PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE ORGANISATION OR 24 | CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 25 | EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 26 | PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 27 | PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 28 | LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 29 | NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 30 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 31 | */ 32 | 33 | #ifndef CONFIG_H 34 | #define CONFIG_H 35 | 36 | /* An inline macro is required for use of the inline keyword as not all C compilers support */ 37 | /* inline. It is officially C99 and C++ only */ 38 | 39 | #ifdef __WINS__ 40 | 41 | #define inline __inline 42 | 43 | /* Disable some pointless/stupid warnings */ 44 | 45 | #pragma warning(disable: 4100) /* unreferenced formal parameter */ 46 | #pragma warning(disable: 4127) /* conditional expression is constant */ 47 | #pragma warning(disable: 4305) /* truncation from '...' to '...' */ 48 | #pragma warning(disable: 4244) /* conversion from '...' to '...', possible loss of data */ 49 | #pragma warning(disable: 4701) /* local variable may be be used without having been initialized */ 50 | 51 | #endif /* ! __WINS__ */ 52 | 53 | /* Use only fixed point arithmetic */ 54 | 55 | #define FIXED_POINT 1 56 | 57 | #endif /* ! CONFIG_H */ 58 | -------------------------------------------------------------------------------- /components/speex/symbian/speex.mmp: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 2003 Commonwealth Scientific and Industrial Research 3 | Organisation (CSIRO) Australia 4 | 5 | Redistribution and use in source and binary forms, with or without 6 | modification, are permitted provided that the following conditions 7 | are met: 8 | 9 | - Redistributions of source code must retain the above copyright 10 | notice, this list of conditions and the following disclaimer. 11 | 12 | - Redistributions in binary form must reproduce the above copyright 13 | notice, this list of conditions and the following disclaimer in the 14 | documentation and/or other materials provided with the distribution. 15 | 16 | - Neither the name of CSIRO Australia nor the names of its 17 | contributors may be used to endorse or promote products derived from 18 | this software without specific prior written permission. 19 | 20 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 21 | ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 22 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A 23 | PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE ORGANISATION OR 24 | CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 25 | EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 26 | PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 27 | PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 28 | LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 29 | NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 30 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 31 | */ 32 | 33 | TARGET speex.lib 34 | TARGETTYPE lib 35 | UID 0 36 | MACRO HAVE_CONFIG_H 37 | SOURCEPATH ..\libspeex 38 | SOURCE bits.c cb_search.c exc_5_64_table.c exc_5_256_table.c exc_8_128_table.c 39 | SOURCE exc_10_16_table.c exc_10_32_table.c exc_20_32_table.c fftwrap.c kiss_fft.c kiss_fftr.c filters.c gain_table.c 40 | SOURCE gain_table_lbr.c hexc_10_32_table.c hexc_table.c high_lsp_tables.c 41 | SOURCE lbr_48k_tables.c lpc.c lsp.c lsp_tables_nb.c ltp.c math_approx.c misc.c 42 | SOURCE modes.c nb_celp.c quant_lsp.c sb_celp.c smallft.c 43 | SOURCE speex.c speex_callbacks.c speex_header.c stereo.c vbr.c vq.c window.c 44 | USERINCLUDE . ..\include\speex 45 | SYSTEMINCLUDE \epoc32\include \epoc32\include\libc ..\include 46 | -------------------------------------------------------------------------------- /components/speex/ti/Makefile.am: -------------------------------------------------------------------------------- 1 | ## Process this file with automake to produce Makefile.in. -*-Makefile-*- 2 | 3 | # Disable automatic dependency tracking if using other tools than gcc and gmake 4 | #AUTOMAKE_OPTIONS = no-dependencies 5 | 6 | SUBDIRS = speex_C54_test speex_C55_test speex_C64_test 7 | 8 | EXTRA_DIST = config.h testenc-TI-C5x.c os_support_custom.h testenc-TI-C64x.c 9 | 10 | -------------------------------------------------------------------------------- /components/speex/ti/speex_C54_test/Makefile.am: -------------------------------------------------------------------------------- 1 | ## Process this file with automake to produce Makefile.in. -*-Makefile-*- 2 | 3 | # Disable automatic dependency tracking if using other tools than gcc and gmake 4 | #AUTOMAKE_OPTIONS = no-dependencies 5 | 6 | EXTRA_DIST = speex_C54_test.cmd speex_C54_test.pjt 7 | 8 | 9 | -------------------------------------------------------------------------------- /components/speex/ti/speex_C54_test/speex_C54_test.pjt: -------------------------------------------------------------------------------- 1 | ; Code Composer Project File, Version 2.0 (do not modify or remove this line) 2 | 3 | [Project Settings] 4 | ProjectDir="C:\Speex\speex_14274\ti\speex_C54_test\" 5 | ProjectType=Executable 6 | CPUFamily=TMS320C54XX 7 | Tool="Compiler" 8 | Tool="CustomBuilder" 9 | Tool="DspBiosBuilder" 10 | Tool="Linker" 11 | Config="Debug" 12 | Config="Release" 13 | 14 | [Source Files] 15 | Source="..\..\libspeex\bits.c" 16 | Source="..\..\libspeex\cb_search.c" 17 | Source="..\..\libspeex\exc_10_16_table.c" 18 | Source="..\..\libspeex\exc_10_32_table.c" 19 | Source="..\..\libspeex\exc_20_32_table.c" 20 | Source="..\..\libspeex\exc_5_256_table.c" 21 | Source="..\..\libspeex\exc_5_64_table.c" 22 | Source="..\..\libspeex\exc_8_128_table.c" 23 | Source="..\..\libspeex\filters.c" 24 | Source="..\..\libspeex\gain_table.c" 25 | Source="..\..\libspeex\gain_table_lbr.c" 26 | Source="..\..\libspeex\lpc.c" 27 | Source="..\..\libspeex\lsp.c" 28 | Source="..\..\libspeex\lsp_tables_nb.c" 29 | Source="..\..\libspeex\ltp.c" 30 | Source="..\..\libspeex\modes.c" 31 | Source="..\..\libspeex\nb_celp.c" 32 | Source="..\..\libspeex\quant_lsp.c" 33 | Source="..\..\libspeex\sb_celp.c" 34 | Source="..\..\libspeex\speex.c" 35 | Source="..\..\libspeex\speex_callbacks.c" 36 | Source="..\..\libspeex\vbr.c" 37 | Source="..\..\libspeex\vq.c" 38 | Source="..\..\libspeex\window.c" 39 | Source="..\..\ti\testenc-TI-C5x.c" 40 | Source="speex_C54_test.cmd" 41 | 42 | ["Compiler" Settings: "Debug"] 43 | Options=-g -q -o3 -fr"..\ti\speex_C54_test\Debug" -i"..\ti" -i"..\include" -d"_DEBUG" -d"CONFIG_TI_C54X" -d"HAVE_CONFIG_H" -d"NO_LONGLONG" -mf -ms 44 | 45 | ["Compiler" Settings: "Release"] 46 | Options=-q -o2 -fr"..\ti\speex_C54_test\Release" -i"..\ti" -i"..\include" -d"CONFIG_TI_C54X" -d"HAVE_CONFIG_H" -d"NO_LONGLONG" -mf -ms 47 | 48 | ["DspBiosBuilder" Settings: "Debug"] 49 | Options=-v54 50 | 51 | ["DspBiosBuilder" Settings: "Release"] 52 | Options=-v54 53 | 54 | ["Linker" Settings: "Debug"] 55 | Options=-q -c -heap4096 -m".\Debug\speex_C54_test.map" -o".\Debug\speex_C54_test.out" -stack4096 -w -x 56 | 57 | ["Linker" Settings: "Release"] 58 | Options=-q -c -m".\Release\speex_C54_test.map" -o".\Release\speex_C54_test.out" -w -x 59 | 60 | -------------------------------------------------------------------------------- /components/speex/ti/speex_C55_test/Makefile.am: -------------------------------------------------------------------------------- 1 | ## Process this file with automake to produce Makefile.in. -*-Makefile-*- 2 | 3 | # Disable automatic dependency tracking if using other tools than gcc and gmake 4 | #AUTOMAKE_OPTIONS = no-dependencies 5 | 6 | EXTRA_DIST = speex_C55_test.cmd speex_C55_test.pjt 7 | -------------------------------------------------------------------------------- /components/speex/ti/speex_C55_test/speex_C55_test.cmd: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2005 Psi Systems, Inc. 2 | File: speex_C55_test.cmd 3 | Linker command file with memory allocation for TI TMS320VC5509A processor 4 | for use with TI Code Composer (TM) DSP development tools. 5 | 6 | Redistribution and use in source and binary forms, with or without 7 | modification, are permitted provided that the following conditions 8 | are met: 9 | 10 | - Redistributions of source code must retain the above copyright 11 | notice, this list of conditions and the following disclaimer. 12 | 13 | - Redistributions in binary form must reproduce the above copyright 14 | notice, this list of conditions and the following disclaimer in the 15 | documentation and/or other materials provided with the distribution. 16 | 17 | - Neither the name of the Xiph.org Foundation nor the names of its 18 | contributors may be used to endorse or promote products derived from 19 | this software without specific prior written permission. 20 | 21 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 22 | ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 23 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 24 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR 25 | CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 26 | EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 27 | PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 28 | PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 29 | LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 30 | NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 31 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 32 | */ 33 | 34 | -c 35 | -stack 0x1c00 36 | -heap 0x1000 /* If private memory allocation is used for Speex */ 37 | /*-heap 0x6000 / * If calloc is used for Speex */ 38 | -sysstack 0x200 39 | -lrts55.lib 40 | 41 | MEMORY 42 | { 43 | DARAM: origin = 0x200, len = 0x7e00 44 | DARAM_B: origin = 0x8000, len = 0x8000 45 | VECT: origin = 0x100, len = 0x100 46 | SARAM_A: origin = 0x10000, len = 0x10000 47 | SARAM_B: origin = 0x20000, len = 0x20000 48 | } 49 | 50 | SECTIONS 51 | { 52 | .vectors: {} > VECT 53 | .bootmem: {} > DARAM 54 | .text: {} > SARAM_B 55 | .cinit: {} > SARAM_B 56 | .switch: {} > SARAM_B 57 | .bss: {} > DARAM 58 | /* .far: {} > DARAM*/ 59 | .const: {} > DARAM 60 | .sysmem: {} > DARAM_B 61 | .cio: {} > DARAM 62 | .stack: {} > DARAM 63 | .sysstack: {} > DARAM 64 | .myheap: {} > SARAM_A 65 | } 66 | -------------------------------------------------------------------------------- /components/speex/ti/speex_C55_test/speex_C55_test.pjt: -------------------------------------------------------------------------------- 1 | ; Code Composer Project File, Version 2.0 (do not modify or remove this line) 2 | 3 | [Project Settings] 4 | ProjectDir="C:\Speex\speex_14274\ti\speex_C55_test\" 5 | ProjectType=Executable 6 | CPUFamily=TMS320C55XX 7 | Tool="Compiler" 8 | Tool="CustomBuilder" 9 | Tool="DspBiosBuilder" 10 | Tool="Linker" 11 | Config="Debug" 12 | Config="Release" 13 | 14 | [Source Files] 15 | Source="..\..\libspeex\bits.c" 16 | Source="..\..\libspeex\cb_search.c" 17 | Source="..\..\libspeex\exc_10_16_table.c" 18 | Source="..\..\libspeex\exc_10_32_table.c" 19 | Source="..\..\libspeex\exc_20_32_table.c" 20 | Source="..\..\libspeex\exc_5_256_table.c" 21 | Source="..\..\libspeex\exc_5_64_table.c" 22 | Source="..\..\libspeex\exc_8_128_table.c" 23 | Source="..\..\libspeex\filters.c" 24 | Source="..\..\libspeex\gain_table.c" 25 | Source="..\..\libspeex\gain_table_lbr.c" 26 | Source="..\..\libspeex\lpc.c" 27 | Source="..\..\libspeex\lsp.c" 28 | Source="..\..\libspeex\lsp_tables_nb.c" 29 | Source="..\..\libspeex\ltp.c" 30 | Source="..\..\libspeex\modes.c" 31 | Source="..\..\libspeex\nb_celp.c" 32 | Source="..\..\libspeex\quant_lsp.c" 33 | Source="..\..\libspeex\sb_celp.c" 34 | Source="..\..\libspeex\speex.c" 35 | Source="..\..\libspeex\speex_callbacks.c" 36 | Source="..\..\libspeex\vbr.c" 37 | Source="..\..\libspeex\vq.c" 38 | Source="..\..\libspeex\window.c" 39 | Source="..\..\ti\testenc-TI-C5x.c" 40 | Source="speex_C55_test.cmd" 41 | 42 | ["Compiler" Settings: "Debug"] 43 | Options=-g -q -o3 -fr"..\ti\speex_C55_test\Debug" -i"..\ti" -i"..\include" -d"_DEBUG" -d"CONFIG_TI_C55X" -d"HAVE_CONFIG_H" -mn 44 | 45 | ["Compiler" Settings: "Release"] 46 | Options=-q -o2 -fr"..\ti\speex_C55_test\Release" -i"..\ti" -i"..\include" -d"CONFIG_TI_C55X" -d"HAVE_CONFIG_H" -mn 47 | 48 | ["DspBiosBuilder" Settings: "Debug"] 49 | Options=-v55 50 | 51 | ["DspBiosBuilder" Settings: "Release"] 52 | Options=-v55 53 | 54 | ["Linker" Settings: "Debug"] 55 | Options=-q -c -m".\Debug\speex_C55_test.map" -o".\Debug\speex_C55_test.out" -w -x 56 | 57 | ["Linker" Settings: "Release"] 58 | Options=-q -c -m".\Release\speex_C55_test.map" -o".\Release\speex_C55_test.out" -w -x 59 | 60 | -------------------------------------------------------------------------------- /components/speex/ti/speex_C64_test/Makefile.am: -------------------------------------------------------------------------------- 1 | ## Process this file with automake to produce Makefile.in. -*-Makefile-*- 2 | 3 | # Disable automatic dependency tracking if using other tools than gcc and gmake 4 | #AUTOMAKE_OPTIONS = no-dependencies 5 | 6 | EXTRA_DIST = speex_C64_test.cmd speex_C64_test.pjt 7 | -------------------------------------------------------------------------------- /components/speex/ti/speex_C64_test/speex_C64_test.cmd: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2005 Psi Systems, Inc. 2 | File: speex_C64_test.cmd 3 | Linker command file with memory allocation for TI TMS320C6415 processor 4 | for use with TI Code Composer (TM) DSP development tools. 5 | 6 | Redistribution and use in source and binary forms, with or without 7 | modification, are permitted provided that the following conditions 8 | are met: 9 | 10 | - Redistributions of source code must retain the above copyright 11 | notice, this list of conditions and the following disclaimer. 12 | 13 | - Redistributions in binary form must reproduce the above copyright 14 | notice, this list of conditions and the following disclaimer in the 15 | documentation and/or other materials provided with the distribution. 16 | 17 | - Neither the name of the Xiph.org Foundation nor the names of its 18 | contributors may be used to endorse or promote products derived from 19 | this software without specific prior written permission. 20 | 21 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 22 | ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 23 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 24 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR 25 | CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 26 | EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 27 | PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 28 | PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 29 | LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 30 | NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 31 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 32 | */ 33 | 34 | -stack 0x10000 35 | -heap 0x10000 36 | 37 | 38 | MEMORY 39 | { 40 | VECRAM : origin = 0x0, len = 0x200 41 | IPRAM : origin = 0x200, len = 0x40000 42 | IDRAM : origin = 0x80000, len = 0x70000 43 | } 44 | 45 | SECTIONS 46 | { 47 | .vectors > VECRAM 48 | .text > IPRAM 49 | 50 | .bss > IDRAM 51 | .cinit > IDRAM 52 | .const > IDRAM 53 | .far > IDRAM 54 | .stack > IDRAM 55 | .cio > IDRAM 56 | .sysmem > IDRAM 57 | .switch > IDRAM 58 | .myheap > IDRAM 59 | } 60 | -------------------------------------------------------------------------------- /components/speex/ti/speex_C64_test/speex_C64_test.pjt: -------------------------------------------------------------------------------- 1 | ; Code Composer Project File, Version 2.0 (do not modify or remove this line) 2 | 3 | [Project Settings] 4 | ProjectDir="C:\Speex\speex_14274\ti\speex_C64_test\" 5 | ProjectType=Executable 6 | CPUFamily=TMS320C64XX 7 | Tool="Compiler" 8 | Tool="CustomBuilder" 9 | Tool="DspBiosBuilder" 10 | Tool="Linker" 11 | Config="Debug" 12 | Config="Release" 13 | 14 | [Source Files] 15 | Source="..\..\..\..\CCStudio_v3.1\C6000\cgtools\lib\rts6400.lib" 16 | Source="..\..\libspeex\bits.c" 17 | Source="..\..\libspeex\cb_search.c" 18 | Source="..\..\libspeex\exc_10_16_table.c" 19 | Source="..\..\libspeex\exc_10_32_table.c" 20 | Source="..\..\libspeex\exc_20_32_table.c" 21 | Source="..\..\libspeex\exc_5_256_table.c" 22 | Source="..\..\libspeex\exc_5_64_table.c" 23 | Source="..\..\libspeex\exc_8_128_table.c" 24 | Source="..\..\libspeex\filters.c" 25 | Source="..\..\libspeex\gain_table.c" 26 | Source="..\..\libspeex\gain_table_lbr.c" 27 | Source="..\..\libspeex\lpc.c" 28 | Source="..\..\libspeex\lsp.c" 29 | Source="..\..\libspeex\lsp_tables_nb.c" 30 | Source="..\..\libspeex\ltp.c" 31 | Source="..\..\libspeex\modes.c" 32 | Source="..\..\libspeex\nb_celp.c" 33 | Source="..\..\libspeex\quant_lsp.c" 34 | Source="..\..\libspeex\sb_celp.c" 35 | Source="..\..\libspeex\speex.c" 36 | Source="..\..\libspeex\speex_callbacks.c" 37 | Source="..\..\libspeex\vbr.c" 38 | Source="..\..\libspeex\vq.c" 39 | Source="..\..\libspeex\window.c" 40 | Source="..\testenc-TI-C64x.c" 41 | Source="speex_C64_test.cmd" 42 | 43 | ["Compiler" Settings: "Debug"] 44 | Options=-g -o3 -fr"$(Proj_dir)\Debug" -i"..\ti" -i"..\include" -d"_DEBUG" -d"CONFIG_TI_C6X" -d"HAVE_CONFIG_H" -mv6400 45 | 46 | ["Compiler" Settings: "Release"] 47 | Options=-o3 -fr"$(Proj_dir)\Release" -i"..\ti" -i"..\include" -d"HAVE_CONFIG_H" -mv6400 48 | 49 | ["DspBiosBuilder" Settings: "Debug"] 50 | Options=-v6x 51 | 52 | ["DspBiosBuilder" Settings: "Release"] 53 | Options=-v6x 54 | 55 | ["Linker" Settings: "Debug"] 56 | Options=-c -m".\Debug\speex_C64_test.map" -o".\Debug\speex_C64_test.out" -w -x 57 | 58 | ["Linker" Settings: "Release"] 59 | Options=-c -m".\Release\speex_C64_test.map" -o".\Release\speex_C64_test.out" -w -x 60 | 61 | -------------------------------------------------------------------------------- /components/speex/win32/Makefile.am: -------------------------------------------------------------------------------- 1 | ## Process this file with automake to produce Makefile.in. -*-Makefile-*- 2 | 3 | # Disable automatic dependency tracking if using other tools than gcc and gmake 4 | #AUTOMAKE_OPTIONS = no-dependencies 5 | 6 | SUBDIRS = libspeex speexenc speexdec VS2003 VS2005 VS2008 7 | 8 | EXTRA_DIST = speex.iss config.h libspeex.def 9 | -------------------------------------------------------------------------------- /components/speex/win32/VS2003/Makefile.am: -------------------------------------------------------------------------------- 1 | ## Process this file with automake to produce Makefile.in. -*-Makefile-*- 2 | 3 | # Disable automatic dependency tracking if using other tools than gcc and gmake 4 | #AUTOMAKE_OPTIONS = no-dependencies 5 | 6 | SUBDIRS = libspeex speexenc speexdec tests 7 | 8 | EXTRA_DIST = libspeex.sln 9 | -------------------------------------------------------------------------------- /components/speex/win32/VS2003/libspeex/Makefile.am: -------------------------------------------------------------------------------- 1 | ## Process this file with automake to produce Makefile.in. -*-Makefile-*- 2 | 3 | # Disable automatic dependency tracking if using other tools than gcc and gmake 4 | #AUTOMAKE_OPTIONS = no-dependencies 5 | 6 | EXTRA_DIST = libspeex.vcproj 7 | 8 | 9 | -------------------------------------------------------------------------------- /components/speex/win32/VS2003/speexdec/Makefile.am: -------------------------------------------------------------------------------- 1 | ## Process this file with automake to produce Makefile.in. -*-Makefile-*- 2 | 3 | # Disable automatic dependency tracking if using other tools than gcc and gmake 4 | #AUTOMAKE_OPTIONS = no-dependencies 5 | 6 | EXTRA_DIST = speexdec.vcproj 7 | 8 | 9 | -------------------------------------------------------------------------------- /components/speex/win32/VS2003/speexenc/Makefile.am: -------------------------------------------------------------------------------- 1 | ## Process this file with automake to produce Makefile.in. -*-Makefile-*- 2 | 3 | # Disable automatic dependency tracking if using other tools than gcc and gmake 4 | #AUTOMAKE_OPTIONS = no-dependencies 5 | 6 | EXTRA_DIST = speexenc.vcproj 7 | 8 | 9 | -------------------------------------------------------------------------------- /components/speex/win32/VS2003/tests/Makefile.am: -------------------------------------------------------------------------------- 1 | ## Process this file with automake to produce Makefile.in. -*-Makefile-*- 2 | 3 | # Disable automatic dependency tracking if using other tools than gcc and gmake 4 | #AUTOMAKE_OPTIONS = no-dependencies 5 | 6 | EXTRA_DIST = testenc.vcproj testenc_uwb.vcproj testenc_wb.vcproj 7 | 8 | 9 | -------------------------------------------------------------------------------- /components/speex/win32/VS2005/Makefile.am: -------------------------------------------------------------------------------- 1 | ## Process this file with automake to produce Makefile.in. -*-Makefile-*- 2 | 3 | # Disable automatic dependency tracking if using other tools than gcc and gmake 4 | #AUTOMAKE_OPTIONS = no-dependencies 5 | 6 | SUBDIRS = libspeex speexenc speexdec tests 7 | 8 | EXTRA_DIST = libspeex.sln 9 | -------------------------------------------------------------------------------- /components/speex/win32/VS2005/libspeex/Makefile.am: -------------------------------------------------------------------------------- 1 | ## Process this file with automake to produce Makefile.in. -*-Makefile-*- 2 | 3 | # Disable automatic dependency tracking if using other tools than gcc and gmake 4 | #AUTOMAKE_OPTIONS = no-dependencies 5 | 6 | EXTRA_DIST = libspeex.vcproj 7 | 8 | 9 | -------------------------------------------------------------------------------- /components/speex/win32/VS2005/speexdec/Makefile.am: -------------------------------------------------------------------------------- 1 | ## Process this file with automake to produce Makefile.in. -*-Makefile-*- 2 | 3 | # Disable automatic dependency tracking if using other tools than gcc and gmake 4 | #AUTOMAKE_OPTIONS = no-dependencies 5 | 6 | EXTRA_DIST = speexdec.vcproj 7 | 8 | 9 | -------------------------------------------------------------------------------- /components/speex/win32/VS2005/speexenc/Makefile.am: -------------------------------------------------------------------------------- 1 | ## Process this file with automake to produce Makefile.in. -*-Makefile-*- 2 | 3 | # Disable automatic dependency tracking if using other tools than gcc and gmake 4 | #AUTOMAKE_OPTIONS = no-dependencies 5 | 6 | EXTRA_DIST = speexenc.vcproj 7 | 8 | 9 | -------------------------------------------------------------------------------- /components/speex/win32/VS2005/tests/Makefile.am: -------------------------------------------------------------------------------- 1 | ## Process this file with automake to produce Makefile.in. -*-Makefile-*- 2 | 3 | # Disable automatic dependency tracking if using other tools than gcc and gmake 4 | #AUTOMAKE_OPTIONS = no-dependencies 5 | 6 | EXTRA_DIST = testenc.vcproj testenc_uwb.vcproj testenc_wb.vcproj 7 | 8 | 9 | -------------------------------------------------------------------------------- /components/speex/win32/VS2008/Makefile.am: -------------------------------------------------------------------------------- 1 | ## Process this file with automake to produce Makefile.in. -*-Makefile-*- 2 | 3 | # Disable automatic dependency tracking if using other tools than gcc and gmake 4 | #AUTOMAKE_OPTIONS = no-dependencies 5 | 6 | SUBDIRS = libspeex speexenc speexdec tests 7 | 8 | EXTRA_DIST = libspeex.sln 9 | -------------------------------------------------------------------------------- /components/speex/win32/VS2008/libspeex/Makefile.am: -------------------------------------------------------------------------------- 1 | ## Process this file with automake to produce Makefile.in. -*-Makefile-*- 2 | 3 | # Disable automatic dependency tracking if using other tools than gcc and gmake 4 | #AUTOMAKE_OPTIONS = no-dependencies 5 | 6 | EXTRA_DIST = libspeex.vcproj 7 | 8 | 9 | -------------------------------------------------------------------------------- /components/speex/win32/VS2008/speexdec/Makefile.am: -------------------------------------------------------------------------------- 1 | ## Process this file with automake to produce Makefile.in. -*-Makefile-*- 2 | 3 | # Disable automatic dependency tracking if using other tools than gcc and gmake 4 | #AUTOMAKE_OPTIONS = no-dependencies 5 | 6 | EXTRA_DIST = speexdec.vcproj 7 | 8 | 9 | -------------------------------------------------------------------------------- /components/speex/win32/VS2008/speexenc/Makefile.am: -------------------------------------------------------------------------------- 1 | ## Process this file with automake to produce Makefile.in. -*-Makefile-*- 2 | 3 | # Disable automatic dependency tracking if using other tools than gcc and gmake 4 | #AUTOMAKE_OPTIONS = no-dependencies 5 | 6 | EXTRA_DIST = speexenc.vcproj 7 | 8 | 9 | -------------------------------------------------------------------------------- /components/speex/win32/VS2008/tests/Makefile.am: -------------------------------------------------------------------------------- 1 | ## Process this file with automake to produce Makefile.in. -*-Makefile-*- 2 | 3 | # Disable automatic dependency tracking if using other tools than gcc and gmake 4 | #AUTOMAKE_OPTIONS = no-dependencies 5 | 6 | EXTRA_DIST = testenc.vcproj testenc_uwb.vcproj testenc_wb.vcproj 7 | 8 | 9 | -------------------------------------------------------------------------------- /components/speex/win32/config.h: -------------------------------------------------------------------------------- 1 | // Microsoft version of 'inline' 2 | #define inline __inline 3 | 4 | // In Visual Studio, _M_IX86_FP=1 means /arch:SSE was used, likewise 5 | // _M_IX86_FP=2 means /arch:SSE2 was used. 6 | // Also, enable both _USE_SSE and _USE_SSE2 if we're compiling for x86-64 7 | #if _M_IX86_FP >= 1 || defined(_M_X64) 8 | #define _USE_SSE 9 | #endif 10 | 11 | #if _M_IX86_FP >= 2 || defined(_M_X64) 12 | #define _USE_SSE2 13 | #endif 14 | 15 | // Visual Studio support alloca(), but it always align variables to 16-bit 16 | // boundary, while SSE need 128-bit alignment. So we disable alloca() when 17 | // SSE is enabled. 18 | #ifndef _USE_SSE 19 | # define USE_ALLOCA 20 | #endif 21 | 22 | /* Default to floating point */ 23 | #ifndef FIXED_POINT 24 | # define FLOATING_POINT 25 | # define USE_SMALLFT 26 | #else 27 | # define USE_KISS_FFT 28 | #endif 29 | 30 | /* We don't support visibility on Win32 */ 31 | #define EXPORT 32 | -------------------------------------------------------------------------------- /components/speex/win32/libspeex.def: -------------------------------------------------------------------------------- 1 | LIBRARY libspeex 2 | EXPORTS 3 | 4 | 5 | ; 6 | ; speex.h 7 | ; 8 | speex_encoder_init 9 | speex_encoder_destroy 10 | speex_encode 11 | speex_encode_int 12 | speex_encoder_ctl 13 | speex_decoder_init 14 | speex_decoder_destroy 15 | speex_decode 16 | speex_decode_int 17 | speex_decoder_ctl 18 | speex_mode_query 19 | speex_lib_ctl 20 | speex_lib_get_mode 21 | 22 | ; 23 | ; speex_bits.h 24 | ; 25 | speex_bits_init 26 | speex_bits_init_buffer 27 | speex_bits_set_bit_buffer 28 | speex_bits_destroy 29 | speex_bits_reset 30 | speex_bits_rewind 31 | speex_bits_read_from 32 | speex_bits_read_whole_bytes 33 | speex_bits_write 34 | speex_bits_write_whole_bytes 35 | speex_bits_pack 36 | speex_bits_unpack_signed 37 | speex_bits_unpack_unsigned 38 | speex_bits_nbytes 39 | speex_bits_peek_unsigned 40 | speex_bits_peek 41 | speex_bits_advance 42 | speex_bits_remaining 43 | speex_bits_insert_terminator 44 | 45 | ; 46 | ; speex_callbacks.h 47 | ; 48 | speex_inband_handler 49 | speex_std_mode_request_handler 50 | speex_std_high_mode_request_handler 51 | speex_std_char_handler 52 | speex_default_user_handler 53 | speex_std_low_mode_request_handler 54 | speex_std_vbr_request_handler 55 | speex_std_enh_request_handler 56 | speex_std_vbr_quality_request_handler 57 | 58 | ; 59 | ; speex_header.h 60 | ; 61 | speex_init_header 62 | speex_header_to_packet 63 | speex_packet_to_header 64 | 65 | ; 66 | ; speex_stereo.h 67 | ; 68 | speex_stereo_state_init 69 | speex_stereo_state_reset 70 | speex_stereo_state_destroy 71 | speex_encode_stereo 72 | speex_encode_stereo_int 73 | speex_decode_stereo 74 | speex_decode_stereo_int 75 | speex_std_stereo_request_handler 76 | -------------------------------------------------------------------------------- /components/speex/win32/libspeex/Makefile.am: -------------------------------------------------------------------------------- 1 | ## Process this file with automake to produce Makefile.in. -*-Makefile-*- 2 | 3 | # Disable automatic dependency tracking if using other tools than gcc and gmake 4 | #AUTOMAKE_OPTIONS = no-dependencies 5 | 6 | EXTRA_DIST = libspeex.dsw libspeex.dsp libspeex_dynamic.dsp 7 | -------------------------------------------------------------------------------- /components/speex/win32/libspeex/libspeex.dsw: -------------------------------------------------------------------------------- 1 | Microsoft Developer Studio Workspace File, Format Version 6.00 2 | # WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! 3 | 4 | ############################################################################### 5 | 6 | Project: "libspeex"=.\libspeex.dsp - Package Owner=<4> 7 | 8 | Package=<5> 9 | {{{ 10 | }}} 11 | 12 | Package=<4> 13 | {{{ 14 | }}} 15 | 16 | ############################################################################### 17 | 18 | Project: "libspeex_dynamic"=.\libspeex_dynamic.dsp - Package Owner=<4> 19 | 20 | Package=<5> 21 | {{{ 22 | }}} 23 | 24 | Package=<4> 25 | {{{ 26 | }}} 27 | 28 | ############################################################################### 29 | 30 | Project: "libspeexdsp"=.\libspeexdsp.dsp - Package Owner=<4> 31 | 32 | Package=<5> 33 | {{{ 34 | }}} 35 | 36 | Package=<4> 37 | {{{ 38 | }}} 39 | 40 | ############################################################################### 41 | 42 | Project: "libspeexdsp_dynamic"=.\libspeexdsp_dynamic.dsp - Package Owner=<4> 43 | 44 | Package=<5> 45 | {{{ 46 | }}} 47 | 48 | Package=<4> 49 | {{{ 50 | }}} 51 | 52 | ############################################################################### 53 | 54 | Global: 55 | 56 | Package=<5> 57 | {{{ 58 | }}} 59 | 60 | Package=<3> 61 | {{{ 62 | }}} 63 | 64 | ############################################################################### 65 | 66 | -------------------------------------------------------------------------------- /components/speex/win32/speex.iss: -------------------------------------------------------------------------------- 1 | ; Script generated by the Inno Setup Script Wizard. 2 | ; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES! 3 | 4 | [Setup] 5 | AppName=Speex 6 | AppVerName=Speex V1.1.6 7 | AppPublisherURL=http://www.speex.org 8 | AppSupportURL=http://www.speex.org 9 | AppUpdatesURL=http://www.speex.org 10 | DefaultDirName={pf}\Speex 11 | DefaultGroupName=Speex 12 | AllowNoIcons=yes 13 | LicenseFile=..\COPYING 14 | InfoAfterFile=..\README 15 | OutputDir=. 16 | OutputBaseFilename=speex_win32_1.1.6_setup 17 | ; uncomment the following line if you want your installation to run on NT 3.51 too. 18 | ; MinVersion=4,3.51 19 | 20 | [Tasks] 21 | ;Name: "desktopicon"; Description: "Create a &desktop icon"; GroupDescription: "Additional icons:"; MinVersion: 4,4 22 | 23 | [Dirs] 24 | Name: "{app}" 25 | Name: "{app}\doc" 26 | Name: "{app}\html" 27 | Name: "{app}\libspeex" 28 | Name: "{app}\libspeex\include" 29 | 30 | [Files] 31 | Source: "speexdec\Release\speexdec.exe"; DestDir: "{app}"; Flags: ignoreversion 32 | Source: "speexenc\Release\speexenc.exe"; DestDir: "{app}"; Flags: ignoreversion 33 | Source: "libspeex\Release\libspeex.lib"; DestDir: "{app}\libspeex"; Flags: ignoreversion 34 | Source: "libspeex\Release\libspeex.exp"; DestDir: "{app}\libspeex"; Flags: ignoreversion 35 | Source: "libspeex\Release\libspeex.dll"; DestDir: "{app}\libspeex"; Flags: ignoreversion 36 | Source: "..\include\speex\speex.h"; DestDir: "{app}\libspeex\include"; Flags: ignoreversion 37 | Source: "..\include\speex\speex_bits.h"; DestDir: "{app}\libspeex\include"; Flags: ignoreversion 38 | Source: "..\include\speex\speex_callbacks.h"; DestDir: "{app}\libspeex\include"; Flags: ignoreversion 39 | Source: "..\include\speex\speex_header.h"; DestDir: "{app}\libspeex\include"; Flags: ignoreversion 40 | Source: "..\include\speex\speex_stereo.h"; DestDir: "{app}\libspeex\include"; Flags: ignoreversion 41 | Source: "..\doc\manual.pdf"; DestDir: "{app}\doc"; Flags: ignoreversion 42 | 43 | [Run] 44 | 45 | -------------------------------------------------------------------------------- /components/speex/win32/speexdec/Makefile.am: -------------------------------------------------------------------------------- 1 | ## Process this file with automake to produce Makefile.in. -*-Makefile-*- 2 | 3 | # Disable automatic dependency tracking if using other tools than gcc and gmake 4 | #AUTOMAKE_OPTIONS = no-dependencies 5 | 6 | EXTRA_DIST = speexdec.dsp speexdec.dsw 7 | -------------------------------------------------------------------------------- /components/speex/win32/speexdec/speexdec.dsw: -------------------------------------------------------------------------------- 1 | Microsoft Developer Studio Workspace File, Format Version 6.00 2 | # WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! 3 | 4 | ############################################################################### 5 | 6 | Project: "libspeex"=..\libspeex\libspeex.dsp - Package Owner=<4> 7 | 8 | Package=<5> 9 | {{{ 10 | }}} 11 | 12 | Package=<4> 13 | {{{ 14 | }}} 15 | 16 | ############################################################################### 17 | 18 | Project: "ogg_static"="..\..\..\libogg\win32\ogg_static.dsp" - Package Owner=<4> 19 | 20 | Package=<5> 21 | {{{ 22 | }}} 23 | 24 | Package=<4> 25 | {{{ 26 | }}} 27 | 28 | ############################################################################### 29 | 30 | Project: "speexdec"=.\speexdec.dsp - Package Owner=<4> 31 | 32 | Package=<5> 33 | {{{ 34 | }}} 35 | 36 | Package=<4> 37 | {{{ 38 | Begin Project Dependency 39 | Project_Dep_Name libspeex 40 | End Project Dependency 41 | Begin Project Dependency 42 | Project_Dep_Name ogg_static 43 | End Project Dependency 44 | }}} 45 | 46 | ############################################################################### 47 | 48 | Global: 49 | 50 | Package=<5> 51 | {{{ 52 | }}} 53 | 54 | Package=<3> 55 | {{{ 56 | }}} 57 | 58 | ############################################################################### 59 | 60 | -------------------------------------------------------------------------------- /components/speex/win32/speexenc/Makefile.am: -------------------------------------------------------------------------------- 1 | ## Process this file with automake to produce Makefile.in. -*-Makefile-*- 2 | 3 | # Disable automatic dependency tracking if using other tools than gcc and gmake 4 | #AUTOMAKE_OPTIONS = no-dependencies 5 | 6 | EXTRA_DIST = speexenc.dsp speexenc.dsw 7 | -------------------------------------------------------------------------------- /components/speex/win32/speexenc/speexenc.dsw: -------------------------------------------------------------------------------- 1 | Microsoft Developer Studio Workspace File, Format Version 6.00 2 | # WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! 3 | 4 | ############################################################################### 5 | 6 | Project: "libspeex"=..\libspeex\libspeex.dsp - Package Owner=<4> 7 | 8 | Package=<5> 9 | {{{ 10 | }}} 11 | 12 | Package=<4> 13 | {{{ 14 | }}} 15 | 16 | ############################################################################### 17 | 18 | Project: "libspeexdsp"=..\libspeex\libspeexdsp.dsp - Package Owner=<4> 19 | 20 | Package=<5> 21 | {{{ 22 | }}} 23 | 24 | Package=<4> 25 | {{{ 26 | }}} 27 | 28 | ############################################################################### 29 | 30 | Project: "ogg_static"=..\..\..\libogg\win32\ogg_static.dsp - Package Owner=<4> 31 | 32 | Package=<5> 33 | {{{ 34 | }}} 35 | 36 | Package=<4> 37 | {{{ 38 | }}} 39 | 40 | ############################################################################### 41 | 42 | Project: "speexenc"=.\speexenc.dsp - Package Owner=<4> 43 | 44 | Package=<5> 45 | {{{ 46 | }}} 47 | 48 | Package=<4> 49 | {{{ 50 | Begin Project Dependency 51 | Project_Dep_Name libspeex 52 | End Project Dependency 53 | Begin Project Dependency 54 | Project_Dep_Name ogg_static 55 | End Project Dependency 56 | Begin Project Dependency 57 | Project_Dep_Name libspeexdsp 58 | End Project Dependency 59 | }}} 60 | 61 | ############################################################################### 62 | 63 | Global: 64 | 65 | Package=<5> 66 | {{{ 67 | }}} 68 | 69 | Package=<3> 70 | {{{ 71 | }}} 72 | 73 | ############################################################################### 74 | 75 | -------------------------------------------------------------------------------- /components/webserver/component.mk: -------------------------------------------------------------------------------- 1 | # 2 | # Main component makefile. 3 | # 4 | # This Makefile can be left empty. By default, it will take the sources in the 5 | # src/ directory, compile them and link them into lib(subdirectory_name).a 6 | # in the build directory. This behaviour is entirely configurable, 7 | # please read the ESP-IDF documents if you need to do this. 8 | # 9 | -------------------------------------------------------------------------------- /components/webserver/include/webserver.h: -------------------------------------------------------------------------------- 1 | #ifndef WEB_SERVER_H 2 | #define WEB_SERVER_H 3 | 4 | 5 | 6 | 7 | 8 | void webserver_task( void *pvParameters ); 9 | 10 | 11 | 12 | 13 | 14 | #endif -------------------------------------------------------------------------------- /components/websocket/component.mk: -------------------------------------------------------------------------------- 1 | # 2 | # Main component makefile. 3 | # 4 | # This Makefile can be left empty. By default, it will take the sources in the 5 | # src/ directory, compile them and link them into lib(subdirectory_name).a 6 | # in the build directory. This behaviour is entirely configurable, 7 | # please read the ESP-IDF documents if you need to do this. 8 | # 9 | -------------------------------------------------------------------------------- /components/websocket/include/websocket.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @section License 3 | * 4 | * The MIT License (MIT) 5 | * 6 | * Copyright (c) 2017, Thomas Barth, barth-dev.de 7 | * 8 | * Permission is hereby granted, free of charge, to any person 9 | * obtaining a copy of this software and associated documentation 10 | * files (the "Software"), to deal in the Software without 11 | * restriction, including without limitation the rights to use, copy, 12 | * modify, merge, publish, distribute, sublicense, and/or sell copies 13 | * of the Software, and to permit persons to whom the Software is 14 | * furnished to do so, subject to the following conditions: 15 | * 16 | * The above copyright notice and this permission notice shall be 17 | * included in all copies or substantial portions of the Software. 18 | * 19 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 20 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 21 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 22 | * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS 23 | * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN 24 | * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 25 | * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 26 | * SOFTWARE. 27 | */ 28 | 29 | 30 | #ifndef _WEBSOCKET_H_ 31 | #define _WEBSOCKET_H_ 32 | 33 | #include "lwip/api.h" 34 | 35 | #define WS_MASK_L 0x4 /**< \brief Length of MASK field in WebSocket Header*/ 36 | 37 | 38 | /** \brief Websocket frame header type*/ 39 | typedef struct { 40 | uint8_t opcode :WS_MASK_L; 41 | uint8_t reserved :3; 42 | uint8_t FIN :1; 43 | uint8_t payload_length :7; 44 | uint8_t mask :1; 45 | } WS_frame_header_t; 46 | 47 | /** \brief Websocket frame type*/ 48 | typedef struct{ 49 | struct netconn* conenction; 50 | WS_frame_header_t frame_header; 51 | size_t payload_length; 52 | char* payload; 53 | }WebSocket_frame_t; 54 | 55 | 56 | /** 57 | * \brief Send data to the websocket client 58 | * 59 | * \return #ERR_VAL: Payload length exceeded 2^7 bytes. 60 | * #ERR_CONN: There is no open connection 61 | * #ERR_OK: Header and payload send 62 | * all other values: derived from #netconn_write (sending frame header or payload) 63 | */ 64 | err_t WS_write_data(char* p_data, size_t length); 65 | 66 | /** 67 | * \brief WebSocket Server task 68 | */ 69 | void ws_server(void *pvParameters); 70 | 71 | 72 | #endif /* _WEBSOCKET_TASK_H_ */ 73 | -------------------------------------------------------------------------------- /example/3d_show/.gitignore: -------------------------------------------------------------------------------- 1 | build/ 2 | sdkconfig.old 3 | -------------------------------------------------------------------------------- /example/3d_show/Makefile: -------------------------------------------------------------------------------- 1 | # 2 | # This is a project Makefile. It is assumed the directory this Makefile resides in is a 3 | # project subdirectory. 4 | # 5 | 6 | PROJECT_NAME := ESP32_SNOW_3D_SHOW 7 | 8 | 9 | a:=$(shell pwd) 10 | b:=$(dir $(patsubst %/,%,$(dir $(a)))) 11 | EXTRA_COMPONENT_DIRS:=$(b)components 12 | 13 | export EXTRA_COMPONENT_DIRS 14 | 15 | include $(IDF_PATH)/make/project.mk 16 | 17 | 18 | -------------------------------------------------------------------------------- /example/3d_show/README.md: -------------------------------------------------------------------------------- 1 | # This is the 3d show demo based on MPU6050 2 | 3 | ## Flow 4 | 5 | * the esp32 actes as a websocket server 6 | * the esp32 caculte the euler angle and push the data to the web page 7 | * the web page receive these data and render euler angle in the three.js 8 | ## How to use 9 | * the esp32 as a sta mode(you also can use ap mode) 10 | * keep your web browser(chorme test ok) in the same net(or join the esp32 ap) 11 | * open the 3d_show.html use your browser,entering the esp32 ip address and connect it. 12 | ![3d_show](https://img.whyengineer.com/3d_show.png) 13 | 14 | # It's a youtube demo vedio 15 | [![3d_show](https://img.youtube.com/vi/n1iKDgKCfHM/0.jpg)](https://www.youtube.com/watch?v=n1iKDgKCfHM) 16 | -------------------------------------------------------------------------------- /example/3d_show/main/component.mk: -------------------------------------------------------------------------------- 1 | # 2 | # Main component makefile. 3 | # 4 | # This Makefile can be left empty. By default, it will take the sources in the 5 | # src/ directory, compile them and link them into lib(subdirectory_name).a 6 | # in the build directory. This behaviour is entirely configurable, 7 | # please read the ESP-IDF documents if you need to do this. 8 | # 9 | 10 | -------------------------------------------------------------------------------- /example/audio_play/.gitignore: -------------------------------------------------------------------------------- 1 | build/ 2 | sdkconfig.old 3 | -------------------------------------------------------------------------------- /example/audio_play/Makefile: -------------------------------------------------------------------------------- 1 | # 2 | # This is a project Makefile. It is assumed the directory this Makefile resides in is a 3 | # project subdirectory. 4 | # 5 | 6 | PROJECT_NAME := ESP32_SNOW_AUDIO_PLAY 7 | 8 | 9 | a:=$(shell pwd) 10 | b:=$(dir $(patsubst %/,%,$(dir $(a)))) 11 | EXTRA_COMPONENT_DIRS:=$(b)components 12 | 13 | export EXTRA_COMPONENT_DIRS 14 | 15 | include $(IDF_PATH)/make/project.mk 16 | 17 | 18 | -------------------------------------------------------------------------------- /example/audio_play/main/Kconfig.projbuild: -------------------------------------------------------------------------------- 1 | menu "ESP32_SNOW Conifg" 2 | 3 | choice MP3_DECODE 4 | prompt "mp3 deocde lib chocie" 5 | default CONFIG_AUDIO_MAD 6 | help 7 | Select the MP3 deocde lib to use. 8 | 9 | config AUDIO_MAD 10 | bool "AUDIO MAD" 11 | help 12 | Select mad https://sourceforge.net/projects/mad/files/libmad/ 13 | 14 | config AUDIO_HELIX 15 | bool "AUDIO HELIX" 16 | help 17 | Select helix https://www.helixcommunity.org/projects/datatype/Mp3dec 18 | 19 | endchoice 20 | 21 | endmenu -------------------------------------------------------------------------------- /example/audio_play/main/component.mk: -------------------------------------------------------------------------------- 1 | # 2 | # Main component makefile. 3 | # 4 | # This Makefile can be left empty. By default, it will take the sources in the 5 | # src/ directory, compile them and link them into lib(subdirectory_name).a 6 | # in the build directory. This behaviour is entirely configurable, 7 | # please read the ESP-IDF documents if you need to do this. 8 | # 9 | 10 | -------------------------------------------------------------------------------- /example/bt_speaker/.gitignore: -------------------------------------------------------------------------------- 1 | build/ 2 | sdkconfig.old 3 | -------------------------------------------------------------------------------- /example/bt_speaker/Makefile: -------------------------------------------------------------------------------- 1 | # 2 | # This is a project Makefile. It is assumed the directory this Makefile resides in is a 3 | # project subdirectory. 4 | # 5 | 6 | PROJECT_NAME := ESP32_SNOW_BT_SPEAKER 7 | 8 | 9 | a:=$(shell pwd) 10 | b:=$(dir $(patsubst %/,%,$(dir $(a)))) 11 | EXTRA_COMPONENT_DIRS:=$(b)components 12 | 13 | export EXTRA_COMPONENT_DIRS 14 | 15 | include $(IDF_PATH)/make/project.mk 16 | 17 | 18 | -------------------------------------------------------------------------------- /example/bt_speaker/main/component.mk: -------------------------------------------------------------------------------- 1 | # 2 | # Main component makefile. 3 | # 4 | # This Makefile can be left empty. By default, it will take the sources in the 5 | # src/ directory, compile them and link them into lib(subdirectory_name).a 6 | # in the build directory. This behaviour is entirely configurable, 7 | # please read the ESP-IDF documents if you need to do this. 8 | # 9 | 10 | -------------------------------------------------------------------------------- /example/bt_speaker/main/main.c: -------------------------------------------------------------------------------- 1 | /* GPIO Example 2 | 3 | This example code is in the Public Domain (or CC0 licensed, at your option.) 4 | 5 | Unless required by applicable law or agreed to in writing, this 6 | software is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR 7 | CONDITIONS OF ANY KIND, either express or implied. 8 | */ 9 | #include 10 | #include 11 | #include 12 | #include "freertos/FreeRTOS.h" 13 | #include "freertos/task.h" 14 | #include "freertos/queue.h" 15 | #include "freertos/event_groups.h" 16 | #include "wm8978.h" 17 | #include "esp_vfs_fat.h" 18 | #include "driver/sdmmc_host.h" 19 | #include "driver/sdmmc_defs.h" 20 | #include "sdmmc_cmd.h" 21 | #include "esp_event_loop.h" 22 | #include "esp_log.h" 23 | #include 24 | #include "nvs.h" 25 | #include "nvs_flash.h" 26 | #include "eth.h" 27 | #include "event.h" 28 | #include "wifi.h" 29 | #include "hal_i2c.h" 30 | #include "hal_i2s.h" 31 | #include "wm8978.h" 32 | #include "webserver.h" 33 | #include "http.h" 34 | #include "cJSON.h" 35 | #include "mdns_task.h" 36 | #include "audio.h" 37 | #include 38 | #include "esp_heap_caps.h" 39 | #include "euler.h" 40 | #include "websocket.h" 41 | #include "esp_heap_caps.h" 42 | #include "bt_speaker.h" 43 | 44 | #define TAG "main:" 45 | // typedef int (*http_data_cb) (http_parser*, const char *at, size_t length); 46 | // typedef int (*http_cb) (http_parser*); 47 | 48 | 49 | //char* http_body; 50 | 51 | #define GPIO_OUTPUT_IO_0 5 52 | #define GPIO_OUTPUT_PIN_SEL ((1< 2 | #include 3 | #include 4 | #include "freertos/FreeRTOS.h" 5 | #include "freertos/task.h" 6 | #include "freertos/queue.h" 7 | #include "freertos/event_groups.h" 8 | #include "esp_log.h" 9 | #include "lwip/err.h" 10 | #include "lwip/sockets.h" 11 | #include "lwip/sys.h" 12 | #include "lwip/netdb.h" 13 | #include "lwip/dns.h" 14 | 15 | #include "http.h" 16 | #include "driver/gpio.h" 17 | #include "cJSON.h" 18 | #include "hal_i2s.h" 19 | #include "wm8978.h" 20 | #include "http_parser.h" 21 | #include "url_parser.h" 22 | #include "spiram_fifo.h" 23 | #include "mp3_decode.h" 24 | 25 | #define TAG "web radio" 26 | 27 | static int header_value_callback(http_parser* a, const char *at, size_t length){ 28 | for(int i=0;i 2 | 3 | 4 | 5 | 6 | 7 | WhyEngineer 8 | 9 | 10 |
11 |

WhyEngineer-ESP32

12 |
13 | ... 14 | ... 15 |
16 |

This is a lightweight webserver framework for esp32

17 |

github:

18 | 19 | 20 |
21 | 22 | -------------------------------------------------------------------------------- /www/static/esp32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hry625/esp32_snow/ac761f2faab5d02a6cd359acfbc97676fb3cf219/www/static/esp32.png -------------------------------------------------------------------------------- /www/static/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hry625/esp32_snow/ac761f2faab5d02a6cd359acfbc97676fb3cf219/www/static/logo.png --------------------------------------------------------------------------------