You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
35 lines
804 B
35 lines
804 B
/*
|
|
* Copyright (c) Hisilicon Technologies Co., Ltd. 2020-2021. All rights reserved.
|
|
* Description: karaoke head file
|
|
* Author: audio
|
|
* Create: 2020-04-03
|
|
*/
|
|
|
|
#ifndef __KARAOKE_H__
|
|
#define __KARAOKE_H__
|
|
|
|
#include <pthread.h>
|
|
|
|
#include "td_type.h"
|
|
#include "uapi_sound.h"
|
|
|
|
#define CHANNELS_2 2
|
|
#define DEFAULT_PERIOD_SIZE 960
|
|
#define DEFAULT_PERIOD_COUNT 4
|
|
#define DEFAULT_PCM_SAMPLES 240
|
|
#define INPUT_CMD_LENGTH 32
|
|
|
|
typedef struct {
|
|
td_bool stop;
|
|
pthread_t thread;
|
|
|
|
uapi_audio_frame ao_frame;
|
|
td_handle track_id;
|
|
} sample_capture_ctx;
|
|
|
|
td_s32 usb_mic_dev_init(unsigned int card);
|
|
td_void usb_mic_dev_deinit(td_void);
|
|
td_void capture_sample_start(sample_capture_ctx *capture_ctx);
|
|
td_void capture_sample_stop(sample_capture_ctx *capture_ctx);
|
|
#endif
|