├── .gitignore ├── components ├── speex │ ├── include │ │ ├── config.h │ │ ├── Makefile.am │ │ └── speex │ │ │ ├── Makefile.am │ │ │ └── speex_config_types.h │ ├── NEWS │ ├── doc │ │ ├── Makefile.am │ │ └── manual.pdf │ ├── component.mk │ ├── INSTALL │ ├── symbian │ │ ├── Makefile.am │ │ ├── bld.inf │ │ ├── speex.mmp │ │ └── config.h │ ├── win32 │ │ ├── speexdec │ │ │ ├── Makefile.am │ │ │ └── speexdec.dsw │ │ ├── speexenc │ │ │ ├── Makefile.am │ │ │ └── speexenc.dsw │ │ ├── VS2003 │ │ │ ├── libspeex │ │ │ │ └── Makefile.am │ │ │ ├── speexdec │ │ │ │ └── Makefile.am │ │ │ ├── speexenc │ │ │ │ └── Makefile.am │ │ │ ├── Makefile.am │ │ │ └── tests │ │ │ │ └── Makefile.am │ │ ├── VS2005 │ │ │ ├── libspeex │ │ │ │ └── Makefile.am │ │ │ ├── speexdec │ │ │ │ └── Makefile.am │ │ │ ├── speexenc │ │ │ │ └── Makefile.am │ │ │ ├── Makefile.am │ │ │ └── tests │ │ │ │ └── Makefile.am │ │ ├── VS2008 │ │ │ ├── libspeex │ │ │ │ └── Makefile.am │ │ │ ├── speexdec │ │ │ │ └── Makefile.am │ │ │ ├── speexenc │ │ │ │ └── Makefile.am │ │ │ ├── Makefile.am │ │ │ └── tests │ │ │ │ └── Makefile.am │ │ ├── libspeex │ │ │ ├── Makefile.am │ │ │ └── libspeex.dsw │ │ ├── Makefile.am │ │ ├── config.h │ │ ├── libspeex.def │ │ └── speex.iss │ ├── ti │ │ ├── speex_C55_test │ │ │ ├── Makefile.am │ │ │ ├── speex_C55_test.pjt │ │ │ └── speex_C55_test.cmd │ │ ├── speex_C64_test │ │ │ ├── Makefile.am │ │ │ ├── speex_C64_test.pjt │ │ │ └── speex_C64_test.cmd │ │ ├── speex_C54_test │ │ │ ├── Makefile.am │ │ │ └── speex_C54_test.pjt │ │ └── Makefile.am │ ├── speex.pc.in │ ├── libspeex │ │ ├── bfin.h │ │ ├── kiss_fftr.h │ │ ├── smallft.h │ │ ├── Makefile.am │ │ ├── lpc.h │ │ ├── exc_10_16_table.c │ │ ├── gain_table_lbr.c │ │ ├── misc_bfin.h │ │ ├── fftwrap.h │ │ ├── vbr.h │ │ ├── vq.h │ │ ├── lsp.h │ │ ├── exc_10_32_table.c │ │ ├── quant_lsp.h │ │ ├── exc_5_64_table.c │ │ └── hexc_10_32_table.c │ ├── m4 │ │ ├── add_cflags.m4 │ │ └── ltversion.m4 │ ├── AUTHORS │ ├── README │ ├── README.blackfin │ ├── Makefile.am │ ├── ChangeLog │ ├── TODO │ ├── README.symbian │ ├── COPYING │ ├── Speex.spec │ ├── Speex.spec.in │ └── README.TI-DSP ├── espressif │ ├── include │ │ ├── eth.h │ │ ├── wifi.h │ │ └── event.h │ ├── component.mk │ ├── .tags │ ├── .tags_sorted_by_file │ ├── eth.c │ ├── event.c │ └── wifi.c ├── hal │ ├── include │ │ ├── hal_tim.h │ │ ├── hal_eth.h │ │ ├── hal_i2s.h │ │ └── hal_i2c.h │ ├── component.mk │ ├── hal_i2s.c │ ├── hal_i2c.c │ └── hal_eth.c ├── ftp │ ├── include │ │ └── ftpd.h │ └── component.mk ├── mad │ ├── mpg12 │ │ ├── readme.txt │ │ └── layer12.h │ ├── include │ │ ├── align.h │ │ ├── layer3.h │ │ ├── bit.h │ │ ├── version.h │ │ ├── global.h │ │ ├── huffman.h │ │ ├── synth.h │ │ └── config.h │ ├── component.mk │ ├── align.c │ ├── Makefile │ ├── fixed.c │ ├── version.c │ └── imdct_s.dat ├── libmdns │ ├── include │ │ └── mdns_task.h │ ├── component.mk │ └── mdns_task.c ├── audio │ ├── include │ │ ├── audio.h │ │ └── aplay.h │ └── component.mk ├── bt_speaker │ ├── include │ │ ├── bt_speaker.h │ │ ├── bt_app_av.h │ │ └── bt_app_core.h │ └── component.mk ├── euler │ ├── include │ │ ├── imuUpdate.h │ │ └── euler.h │ └── component.mk ├── webserver │ ├── include │ │ └── webserver.h │ └── component.mk ├── liblame │ ├── component.mk │ ├── library │ │ ├── LICENSE │ │ └── vector │ │ │ └── lame_intrin.h │ └── include │ │ ├── lameerror.h │ │ ├── newmdct.h │ │ ├── lame_intrin.h │ │ ├── vbrquantize.h │ │ ├── reservoir.h │ │ ├── fft.h │ │ ├── quantize.h │ │ ├── bitstream.h │ │ ├── id3tag.h │ │ ├── psymodel.h │ │ ├── config.h │ │ ├── version.h │ │ ├── l3side.h │ │ ├── tables.h │ │ ├── set_get.h │ │ └── VbrTag.h ├── helix │ └── component.mk ├── http │ ├── include │ │ ├── http.h │ │ └── url_parser.h │ └── component.mk ├── bsp │ └── component.mk ├── websocket │ ├── component.mk │ └── include │ │ └── websocket.h └── fifo │ ├── include │ ├── spiram_fifo.h │ └── spiram.h │ └── component.mk ├── example ├── speex │ ├── .gitignore │ ├── rawpcm.wav │ ├── README.md │ ├── main │ │ └── component.mk │ └── Makefile ├── 3d_show │ ├── .gitignore │ ├── main │ │ └── component.mk │ ├── Makefile │ └── README.md ├── audio_play │ ├── .gitignore │ ├── main │ │ ├── component.mk │ │ └── Kconfig.projbuild │ └── Makefile ├── bt_speaker │ ├── .gitignore │ ├── main │ │ ├── component.mk │ │ └── main.c │ └── Makefile ├── ftp_server │ ├── .gitignore │ ├── main │ │ └── component.mk │ └── Makefile ├── web_radio │ ├── .gitignore │ ├── main │ │ ├── include │ │ │ ├── mp3_decode.h │ │ │ └── web_radio.h │ │ ├── component.mk │ │ └── web_radio.c │ └── Makefile ├── web_server │ ├── .gitignore │ ├── main │ │ └── component.mk │ └── Makefile └── lame_encode │ ├── .gitignore │ ├── Sample16kHz.raw │ ├── Makefile │ └── main │ └── component.mk ├── www ├── static │ ├── esp32.png │ └── logo.png └── index.html ├── .gitmodules └── README.md /.gitignore: -------------------------------------------------------------------------------- 1 | build/ 2 | sdkconfig.old 3 | -------------------------------------------------------------------------------- /components/speex/include/config.h: -------------------------------------------------------------------------------- 1 | #define EXPORT -------------------------------------------------------------------------------- /example/speex/.gitignore: -------------------------------------------------------------------------------- 1 | build/ 2 | sdkconfig.old 3 | -------------------------------------------------------------------------------- /example/3d_show/.gitignore: -------------------------------------------------------------------------------- 1 | build/ 2 | sdkconfig.old 3 | -------------------------------------------------------------------------------- /example/audio_play/.gitignore: -------------------------------------------------------------------------------- 1 | build/ 2 | sdkconfig.old 3 | -------------------------------------------------------------------------------- /example/bt_speaker/.gitignore: -------------------------------------------------------------------------------- 1 | build/ 2 | sdkconfig.old 3 | -------------------------------------------------------------------------------- /example/ftp_server/.gitignore: -------------------------------------------------------------------------------- 1 | build/ 2 | sdkconfig.old 3 | -------------------------------------------------------------------------------- /example/web_radio/.gitignore: -------------------------------------------------------------------------------- 1 | build/ 2 | sdkconfig.old 3 | -------------------------------------------------------------------------------- /example/web_server/.gitignore: -------------------------------------------------------------------------------- 1 | build/ 2 | sdkconfig.old 3 | -------------------------------------------------------------------------------- /components/speex/include/Makefile.am: -------------------------------------------------------------------------------- 1 | 2 | SUBDIRS = speex 3 | -------------------------------------------------------------------------------- /example/lame_encode/.gitignore: -------------------------------------------------------------------------------- 1 | build/ 2 | sdkconfig.old 3 | -------------------------------------------------------------------------------- /components/speex/NEWS: -------------------------------------------------------------------------------- 1 | 2002/02/13: Creation of the "Speex" project 2 | -------------------------------------------------------------------------------- /components/speex/doc/Makefile.am: -------------------------------------------------------------------------------- 1 | doc_DATA = manual.pdf 2 | 3 | EXTRA_DIST = $(doc_DATA) 4 | -------------------------------------------------------------------------------- /www/static/esp32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/whyengineer/esp32_snow/HEAD/www/static/esp32.png -------------------------------------------------------------------------------- /www/static/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/whyengineer/esp32_snow/HEAD/www/static/logo.png -------------------------------------------------------------------------------- /example/speex/rawpcm.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/whyengineer/esp32_snow/HEAD/example/speex/rawpcm.wav -------------------------------------------------------------------------------- /components/espressif/include/eth.h: -------------------------------------------------------------------------------- 1 | #ifndef _ETH_H 2 | #define _ETH_H 3 | 4 | void eth_init(); 5 | 6 | #endif -------------------------------------------------------------------------------- /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/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/mad/mpg12/readme.txt: -------------------------------------------------------------------------------- 1 | Because of size constraints, the option to read mpg1/2 files has been 2 | disabled. -------------------------------------------------------------------------------- /components/mad/include/align.h: -------------------------------------------------------------------------------- 1 | char unalChar(char unsigned const *adr); 2 | short unalShort(short unsigned const *adr); 3 | -------------------------------------------------------------------------------- /components/speex/doc/manual.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/whyengineer/esp32_snow/HEAD/components/speex/doc/manual.pdf -------------------------------------------------------------------------------- /example/lame_encode/Sample16kHz.raw: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/whyengineer/esp32_snow/HEAD/example/lame_encode/Sample16kHz.raw -------------------------------------------------------------------------------- /.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "components/espmqtt"] 2 | path = components/espmqtt 3 | url = https://github.com/tuanpmt/espmqtt.git 4 | -------------------------------------------------------------------------------- /components/ftp/component.mk: -------------------------------------------------------------------------------- 1 | 2 | ifdef CONFIG_FTP_SERVER 3 | COMPONENT_ADD_INCLUDEDIRS := include 4 | COMPONENT_OBJS:=ftpd.o 5 | endif 6 | -------------------------------------------------------------------------------- /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/mad/component.mk: -------------------------------------------------------------------------------- 1 | ifdef CONFIG_AUDIO_MAD 2 | COMPONENT_ADD_INCLUDEDIRS := include 3 | CFLAGS += -DCONFIG_AUDIO_MAD 4 | 5 | endif 6 | 7 | -------------------------------------------------------------------------------- /components/speex/component.mk: -------------------------------------------------------------------------------- 1 | 2 | COMPONENT_ADD_INCLUDEDIRS := include 3 | COMPONENT_SRCDIRS:=libspeex 4 | CFLAGS+=-DFLOATING_POINT -DHAVE_CONFIG_H -------------------------------------------------------------------------------- /example/web_radio/main/include/mp3_decode.h: -------------------------------------------------------------------------------- 1 | #ifndef MP3_DECODE_H 2 | #define MP3_DECODE_H 3 | 4 | void mp3_decode_task(void *pvParameters); 5 | 6 | 7 | #endif -------------------------------------------------------------------------------- /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 -------------------------------------------------------------------------------- /example/web_radio/main/include/web_radio.h: -------------------------------------------------------------------------------- 1 | 2 | #ifndef WEB_RADIO 3 | #define WEB_RADIO 4 | 5 | void web_radio_task(void* pvParameters); 6 | 7 | 8 | 9 | 10 | 11 | #endif -------------------------------------------------------------------------------- /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/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/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/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/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/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 | -------------------------------------------------------------------------------- /example/speex/README.md: -------------------------------------------------------------------------------- 1 | ## speex 2 | 3 | 1. need a sd card 4 | 2. copy the rawpcm.wav to the sd card root path 5 | 3. sudo make flash monitor 6 | 7 | then the code encode the rawpcm.wav to speex.spx, and decode the speex.spx to newrawpcm.wav 8 | 9 | -------------------------------------------------------------------------------- /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/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/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/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/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/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/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/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/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/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_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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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 | -------------------------------------------------------------------------------- /example/speex/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 | -------------------------------------------------------------------------------- /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/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/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 | -------------------------------------------------------------------------------- /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/web_radio/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 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /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/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/ftp_server/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/web_server/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 | -------------------------------------------------------------------------------- /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/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 | -------------------------------------------------------------------------------- /example/speex/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_SPEEX 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/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/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/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/ftp_server/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_FTP_SERVER 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/lame_encode/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_LAME_ENCODE 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/web_server/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_WEB_SERVER 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 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /example/lame_encode/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 | COMPONENT_EMBED_FILES := ../Sample16kHz.raw -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /example/web_radio/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_FTP_SERVER 7 | 8 | CFLAGS+=-DCONFIG_AUDIO_MAD 9 | 10 | a:=$(shell pwd) 11 | b:=$(dir $(patsubst %/,%,$(dir $(a)))) 12 | EXTRA_COMPONENT_DIRS:=$(b)components 13 | 14 | export EXTRA_COMPONENT_DIRS 15 | 16 | include $(IDF_PATH)/make/project.mk 17 | 18 | 19 | -------------------------------------------------------------------------------- /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/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/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 | -------------------------------------------------------------------------------- /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 -------------------------------------------------------------------------------- /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/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/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/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/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/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 -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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 | -------------------------------------------------------------------------------- /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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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 | -------------------------------------------------------------------------------- /example/web_radio/main/web_radio.c: -------------------------------------------------------------------------------- 1 | #include 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 | -------------------------------------------------------------------------------- /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/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/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/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/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/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 | -------------------------------------------------------------------------------- /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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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 | } -------------------------------------------------------------------------------- /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<