forked from xiaozhi/xiaozhi-esp32
1.3.1 Updates
- Add startup and network failure sound effects - 12864 OLED scroll text - Internalization of volume actions
This commit is contained in:
@@ -52,6 +52,18 @@ def generate_header(input_path, output_path):
|
||||
static_cast<const char*>(p3_{base_name}_start),
|
||||
static_cast<size_t>(p3_{base_name}_end - p3_{base_name}_start)
|
||||
}};''')
|
||||
|
||||
# 生成公共音效
|
||||
for file in os.listdir(os.path.join(os.path.dirname(output_path), 'common')):
|
||||
if file.endswith('.p3'):
|
||||
base_name = os.path.splitext(file)[0]
|
||||
sounds.append(f'''
|
||||
extern const char p3_{base_name}_start[] asm("_binary_{base_name}_p3_start");
|
||||
extern const char p3_{base_name}_end[] asm("_binary_{base_name}_p3_end");
|
||||
static const std::string_view P3_{base_name.upper()} {{
|
||||
static_cast<const char*>(p3_{base_name}_start),
|
||||
static_cast<size_t>(p3_{base_name}_end - p3_{base_name}_start)
|
||||
}};''')
|
||||
|
||||
# 填充模板
|
||||
content = HEADER_TEMPLATE.format(
|
||||
|
||||
Reference in New Issue
Block a user