Skip to content

Commit

Permalink
Merge pull request #14 from dragonforward/dev
Browse files Browse the repository at this point in the history
add audio_source_code
  • Loading branch information
Neutree authored Jul 14, 2024
2 parents 4a2bc34 + b0aad68 commit f7dfa44
Show file tree
Hide file tree
Showing 30 changed files with 4,934 additions and 0 deletions.
1,414 changes: 1,414 additions & 0 deletions projects/app_audio/README.md

Large diffs are not rendered by default.

12 changes: 12 additions & 0 deletions projects/app_audio/app.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
id: sound_recorder
name: sound recorder
name[zh]:
version: 1.0.0
icon: assets/audio.png
author: dragonforward
desc:
desc[zh]:
files:
app.yaml: app.yaml
assets: assets
README.md: README.md
Binary file added projects/app_audio/assets/audio.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
88 changes: 88 additions & 0 deletions projects/app_audio/main/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
############### Add include ###################

set(src_path "/home/wxw/MaixCDK/dl/extracted/lvgl_srcs/lvgl-9.1.0/lvgl") # MaixCDK/dl/extracted/lvgl_srcs/lvgl-9.0.0/lvgl

################# Add include #################
list(APPEND ADD_INCLUDE "include"
"."
"${src_path}"
"${src_path}/src/"
"${src_path}/src/core"
"${src_path}/src/display"
"${src_path}/src/draw"
"${src_path}/src/drivers"
"${src_path}/src/font"
"${src_path}/src/indev"
"${src_path}/src/layouts"
"${src_path}/src/libs"
"${src_path}/src/misc"
"${src_path}/src/osal"
"${src_path}/src/others"
"${src_path}/src/stdlib"
"${src_path}/src/themes"
"${src_path}/src/tick"
"${src_path}/src/widgets"
"${src_path}/src"
"ui/screens"
"ui/components"
"ui/fonts"
"ui/imgbtn_ui"
"ui"
)
# list(APPEND ADD_INCLUDE "include"
# "ui/screens"
# "ui/components"
# "ui/fonts"
# "ui"
# )
# list(APPEND ADD_PRIVATE_INCLUDE "")
###############################################

############ Add source files #################
# list(APPEND ADD_SRCS "src/main.c"
# "src/test.c"
# )
# aux_source_directory(src ADD_SRCS) # collect all source file in src dir, will set var ADD_SRCS
append_srcs_dir(ADD_SRCS "src") # append source file in src dir to var ADD_SRCS
append_srcs_dir(ADD_SRCS "ui")
append_srcs_dir(ADD_SRCS "ui/screens")
append_srcs_dir(ADD_SRCS "ui/components")
append_srcs_dir(ADD_SRCS "ui/fonts")
append_srcs_dir(ADD_SRCS "ui/imgbtn_ui")
# list(REMOVE_ITEM COMPONENT_SRCS "src/test2.c")
###############################################

###### Add required/dependent components ######
list(APPEND ADD_REQUIREMENTS basic lvgl peripheral voice)
###############################################

###### Add link search path for requirements/libs ######
# list(APPEND ADD_LINK_SEARCH_PATH "${CONFIG_TOOLCHAIN_PATH}/lib")
list(APPEND ADD_REQUIREMENTS pthread m) # add system libs, pthread and math lib for example here
###############################################

############ Add static libs ##################
# list(APPEND ADD_STATIC_LIB "lib/libtest.a")
###############################################

#### Add compile option for this component ####
#### Just for this component, won't affect other
#### modules, including component that depend
#### on this component
# list(APPEND ADD_DEFINITIONS_PRIVATE -DAAAAA=1)

#### Add compile option for this component
#### and components denpend on this component
# list(APPEND ADD_DEFINITIONS -DAAAAA222=1
# -DAAAAA333=1)
###############################################

############ Add static libs ##################
#### Update parent's variables like CMAKE_C_LINK_FLAGS
# set(CMAKE_C_LINK_FLAGS "${CMAKE_C_LINK_FLAGS} -Wl,--start-group libmaix/libtest.a -ltest2 -Wl,--end-group" PARENT_SCOPE)
###############################################



register_component()

14 changes: 14 additions & 0 deletions projects/app_audio/main/include/main.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#pragma once
#include <stdio.h>
typedef struct audio_node
{
char name_audio[100];
struct audio_node *next=NULL; //下一张

}audio_node;
void *thread_play_func(void *arg);
extern void stop_playing(void);
extern void start_playing(void);
void *thread_pause_func(void *arg);
void play_wav_thread();
void *thread_play_func(void *arg);
Loading

0 comments on commit f7dfa44

Please sign in to comment.