Skip to content

Commit 25cc074

Browse files
committed
av_stream: support audio resample
Close #949
1 parent 730d007 commit 25cc074

File tree

10 files changed

+304
-200
lines changed

10 files changed

+304
-200
lines changed
Lines changed: 38 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -1,52 +1,38 @@
1-
/*
2-
* ESPRESSIF MIT License
3-
*
4-
* Copyright (c) 2021 <ESPRESSIF SYSTEMS (SHANGHAI) CO., LTD>
5-
*
6-
* Permission is hereby granted for use on all ESPRESSIF SYSTEMS products, in which case,
7-
* it is free of charge, to any person obtaining a copy of this software and associated
8-
* documentation files (the "Software"), to deal in the Software without restriction, including
9-
* without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense,
10-
* and/or sell copies of the Software, and to permit persons to whom the Software is furnished
11-
* to do so, subject to the following conditions:
12-
*
13-
* The above copyright notice and this permission notice shall be included in all copies or
14-
* substantial portions of the Software.
15-
*
16-
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17-
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
18-
* FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
19-
* COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
20-
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
21-
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
22-
*
23-
*/
24-
25-
const char* tone_uri[] = {
26-
"flash://tone/0_Bt_Reconnect.mp3",
27-
"flash://tone/1_Wechat.mp3",
28-
"flash://tone/2_Welcome_To_Wifi.mp3",
29-
"flash://tone/3_New_Version_Available.mp3",
30-
"flash://tone/4_Bt_Success.mp3",
31-
"flash://tone/5_Freetalk.mp3",
32-
"flash://tone/6_Upgrade_Done.mp3",
33-
"flash://tone/7_shutdown.mp3",
34-
"flash://tone/8_Alarm.mp3",
35-
"flash://tone/9_Wifi_Success.mp3",
36-
"flash://tone/10_Under_Smartconfig.mp3",
37-
"flash://tone/11_Out_Of_Power.mp3",
38-
"flash://tone/12_server_connect.mp3",
39-
"flash://tone/13_hello.mp3",
40-
"flash://tone/14_new_message.mp3",
41-
"flash://tone/15_Please_Retry_Wifi.mp3",
42-
"flash://tone/16_please_setting_wifi.mp3",
43-
"flash://tone/17_Welcome_To_Bt.mp3",
44-
"flash://tone/18_Wifi_Time_Out.mp3",
45-
"flash://tone/19_Wifi_Reconnect.mp3",
46-
"flash://tone/20_server_disconnect.mp3",
47-
};
48-
49-
int get_tone_uri_num()
50-
{
51-
return sizeof(tone_uri) / sizeof(char *) - 1;
52-
}
1+
/*
2+
* ESPRESSIF MIT License
3+
*
4+
* Copyright (c) 2023 <ESPRESSIF SYSTEMS (SHANGHAI) CO., LTD>
5+
*
6+
* Permission is hereby granted for use on all ESPRESSIF SYSTEMS products, in which case,
7+
* it is free of charge, to any person obtaining a copy of this software and associated
8+
* documentation files (the "Software"), to deal in the Software without restriction, including
9+
* without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense,
10+
* and/or sell copies of the Software, and to permit persons to whom the Software is furnished
11+
* to do so, subject to the following conditions:
12+
*
13+
* The above copyright notice and this permission notice shall be included in all copies or
14+
* substantial portions of the Software.
15+
*
16+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
18+
* FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
19+
* COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
20+
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
21+
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
22+
*
23+
*/
24+
25+
const char* tone_uri[] = {
26+
"flash://tone/0_Alarm.mp3",
27+
"flash://tone/1_Under_Smartconfig.mp3",
28+
"flash://tone/2_Wifi_Reconnect.mp3",
29+
"flash://tone/3_Wifi_Success.mp3",
30+
"flash://tone/4_please_setting_wifi.mp3",
31+
"flash://tone/5_server_connect.mp3",
32+
"flash://tone/6_server_disconnect.mp3",
33+
};
34+
35+
int get_tone_uri_num()
36+
{
37+
return sizeof(tone_uri) / sizeof(char *) - 1;
38+
}

examples/protocols/components/audio_flash_tone/audio_tone_uri.h

Lines changed: 4 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*
22
* ESPRESSIF MIT License
33
*
4-
* Copyright (c) 2021 <ESPRESSIF SYSTEMS (SHANGHAI) CO., LTD>
4+
* Copyright (c) 2023 <ESPRESSIF SYSTEMS (SHANGHAI) CO., LTD>
55
*
66
* Permission is hereby granted for use on all ESPRESSIF SYSTEMS products, in which case,
77
* it is free of charge, to any person obtaining a copy of this software and associated
@@ -32,26 +32,12 @@ extern "C" {
3232
extern const char* tone_uri[];
3333

3434
typedef enum {
35-
TONE_TYPE_BT_RECONNECT,
36-
TONE_TYPE_WECHAT,
37-
TONE_TYPE_WELCOME_TO_WIFI,
38-
TONE_TYPE_NEW_VERSION_AVAILABLE,
39-
TONE_TYPE_BT_SUCCESS,
40-
TONE_TYPE_FREETALK,
41-
TONE_TYPE_UPGRADE_DONE,
42-
TONE_TYPE_SHUTDOWN,
4335
TONE_TYPE_ALARM,
44-
TONE_TYPE_WIFI_SUCCESS,
4536
TONE_TYPE_UNDER_SMARTCONFIG,
46-
TONE_TYPE_OUT_OF_POWER,
47-
TONE_TYPE_SERVER_CONNECT,
48-
TONE_TYPE_HELLO,
49-
TONE_TYPE_NEW_MESSAGE,
50-
TONE_TYPE_PLEASE_RETRY_WIFI,
51-
TONE_TYPE_PLEASE_SETTING_WIFI,
52-
TONE_TYPE_WELCOME_TO_BT,
53-
TONE_TYPE_WIFI_TIME_OUT,
5437
TONE_TYPE_WIFI_RECONNECT,
38+
TONE_TYPE_WIFI_SUCCESS,
39+
TONE_TYPE_PLEASE_SETTING_WIFI,
40+
TONE_TYPE_SERVER_CONNECT,
5541
TONE_TYPE_SERVER_DISCONNECT,
5642
TONE_TYPE_MAX,
5743
} tone_type_t;
-274 KB
Binary file not shown.

0 commit comments

Comments
 (0)