54 lines
1.1 KiB
C
54 lines
1.1 KiB
C
#ifndef __ADUIO_PLAYBACK_H__
|
|
#define __ADUIO_PLAYBACK_H__
|
|
|
|
#include "server/audio_server.h"
|
|
#include "server/server_core.h"
|
|
#include "system/app_core.h"
|
|
#include "generic/circular_buf.h"
|
|
#include "os/os_api.h"
|
|
#include "app_config.h"
|
|
#include "system/includes.h"
|
|
#include "wifi/wifi_connect.h"
|
|
#include "syscfg/syscfg_id.h"
|
|
#include "storage_device.h"
|
|
#include "fs/fs.h"
|
|
#include <time.h>
|
|
#include "device/device.h"
|
|
#include "asm/clock.h"
|
|
#include "spiflash.h"
|
|
#include "asm/sfc_norflash_api.h"
|
|
#include "event/device_event.h"
|
|
#include "websocket_tts.h"
|
|
|
|
//音频参数
|
|
#define CONFIG_STORE_VOLUME
|
|
#define VOLUME_STEP 5
|
|
#define MIN_VOLUME_VALUE 5
|
|
#define MAX_VOLUME_VALUE 100
|
|
#define INIT_VOLUME_VALUE 50
|
|
|
|
extern OS_SEM voice_start_sem;
|
|
|
|
extern u8 boot_flag;
|
|
|
|
extern u8 playback_stop_flag;
|
|
|
|
//解码参数结构体
|
|
struct playback_hdl {
|
|
struct server *dec_server;
|
|
char volume;
|
|
u8 channel;
|
|
void *cache_buf;
|
|
cbuffer_t save_cbuf;
|
|
int sample_rate;
|
|
OS_SEM r_sem;
|
|
OS_SEM w_sem;
|
|
volatile u8 run_flag;
|
|
FILE *file;
|
|
};
|
|
|
|
int playback_file(FILE *res); //本地播放
|
|
|
|
|
|
#endif
|