added python tool inital version
This commit is contained in:
35
firmware/src/audio.h
Normal file
35
firmware/src/audio.h
Normal file
@@ -0,0 +1,35 @@
|
||||
#ifndef AUDIO_H
|
||||
#define AUDIO_H
|
||||
|
||||
#define AUDIO_PATH "/lfs/a"
|
||||
#define AUDIO_EVENT_PLAY BIT(0)
|
||||
#define AUDIO_EVENT_STOP BIT(1)
|
||||
#define AUDIO_EVENT_SYNC BIT(8)
|
||||
|
||||
#define AUDIO_THREAD_STACK_SIZE 2048
|
||||
#define AUDIO_THREAD_PRIORITY 5
|
||||
#define AUDIO_EVENTS_MASK (AUDIO_EVENT_PLAY | AUDIO_EVENT_STOP | AUDIO_EVENT_SYNC)
|
||||
|
||||
#define AUDIO_BLOCK_SIZE 1024
|
||||
#define AUDIO_BLOCK_COUNT 4
|
||||
#define AUDIO_WORD_WIDTH 16
|
||||
#define AUDIO_SAMPLE_RATE 16000
|
||||
|
||||
/**
|
||||
* @brief Initializes the audio subsystem
|
||||
*
|
||||
* @return 0 on success, negative error code on failure
|
||||
*/
|
||||
int audio_init(void);
|
||||
|
||||
/**
|
||||
* @brief Plays an audio file from the filesystem
|
||||
*/
|
||||
void audio_play(void);
|
||||
|
||||
/**
|
||||
* @brief Stops the currently playing audio
|
||||
*/
|
||||
void audio_stop(void);
|
||||
|
||||
#endif // AUDIO_H
|
||||
Reference in New Issue
Block a user