Developer World
Spresense SDK Library v3.2.0-ebc0364
audio_recorder_api.h File Reference

CXD5602 Audio Recorder API. More...

#include <stdint.h>
#include <stdbool.h>
#include "audio/audio_common_defs.h"
#include "audio/audio_object_common_api.h"

Go to the source code of this file.

Classes

struct  AsRecorderOutputDeviceHdlr
 
struct  AsActivateRecorderParam
 
struct  AsActivateRecorder
 
struct  AsInitRecorderParam
 
union  RecorderCommand
 
struct  AsRecorderMsgQueId_t
 
struct  AsRecorderPoolId_t
 
struct  AsRecorderPoolId_old_t
 
struct  AsCreateRecorderParam_t
 
struct  AsCreateRecorderParams_t
 

Macros

#define AS_FEATURE_RECORDER_ENABLE
 
Packet length of command
#define LENGTH_START_RECORDER   2
 StartRec command (AUDCMD_STARTREC) packet length.
 
#define LENGTH_STOP_RECORDER   2
 StopRec command (AUDCMD_STOPREC) packet length.
 
#define LENGTH_INIT_RECORDER   10
 InitRecorder command (AUDCMD_INITREC) packet length.
 

Typedefs

typedef void(* AudioSimpleFifoWriteDoneCallbackFunction) (uint32_t size)
 
typedef bool(* MediaRecorderCallback) (AsRecorderEvent evtype, uint32_t result, uint32_t sub_result)
 

Enumerations

enum  AsRecorderEvent {
  AsRecorderEventAct = 0 , AsRecorderEventDeact , AsRecorderEventInit , AsRecorderEventStart ,
  AsRecorderEventReqEncode , AsRecorderEventStop
}
 
enum  AsSetRecorderStsInputDevice {
  AS_SETRECDR_STS_INPUTDEVICE_MIC = 0 , AS_SETRECDR_STS_INPUTDEVICE_I2S , AS_SETRECDR_STS_INPUTDEVICE_MIC_A = AS_SETRECDR_STS_INPUTDEVICE_MIC , AS_SETRECDR_STS_INPUTDEVICE_MIC_D = AS_SETRECDR_STS_INPUTDEVICE_MIC ,
  AS_SETRECDR_STS_INPUTDEVICE_I2S_IN = AS_SETRECDR_STS_INPUTDEVICE_I2S , AS_SETRECDR_STS_INPUTDEVICE_NUM
}
 
enum  AsSetRecorderStsOutputDevice { AS_SETRECDR_STS_OUTPUTDEVICE_EMMC = 0 , AS_SETRECDR_STS_OUTPUTDEVICE_RAM , AS_SETRECDR_STS_OUTPUTDEVICE_NUM }
 
enum  AsInitRecorderComputationalComplexity {
  AS_INITREC_COMPLEXITY_0 = 0 , AS_INITREC_COMPLEXITY_1 , AS_INITREC_COMPLEXITY_2 , AS_INITREC_COMPLEXITY_3 ,
  AS_INITREC_COMPLEXITY_4 , AS_INITREC_COMPLEXITY_5 , AS_INITREC_COMPLEXITY_6 , AS_INITREC_COMPLEXITY_7 ,
  AS_INITREC_COMPLEXITY_8 , AS_INITREC_COMPLEXITY_9 , AS_INITREC_COMPLEXITY_10 , AS_INITREC_COMPLEXITY_NUM
}
 

Functions

bool AS_CreateMediaRecorder (FAR AsCreateRecorderParam_t *param, AudioAttentionCb attcb)
 Create audio recorder. More...
 
bool AS_CreateMediaRecorder (FAR AsCreateRecorderParams_t *param, AudioAttentionCb attcb)
 
 __attribute__ ((deprecated("\n \ \n Deprecated create API is used. \ \n Use \"AS_CreateMediaRecorder(AsCreateRecorderParam_t, \ \n AudioAttentionCb)\". \ \n \ \n"))) bool AS_CreateMediaRecorder(FAR AsCreateRecorderParam_t *param)
 
bool AS_ActivateMediaRecorder (FAR AsActivateRecorder *actparam)
 Activate audio recorder. More...
 
bool AS_InitMediaRecorder (FAR AsInitRecorderParam *initparam)
 Init audio recorder. More...
 
bool AS_ReqEncodeMediaRecorder (AsPcmDataParam *pcmparam)
 Request encode to audio recorder. More...
 
bool AS_StartMediaRecorder (void)
 Start audio recorder. More...
 
bool AS_StopMediaRecorder (void)
 Stop audio recorder. More...
 
bool AS_DeactivateMediaRecorder (void)
 Deactivate audio recorder. More...
 
bool AS_DeleteMediaRecorder (void)
 Deactivate audio recorder. More...
 
bool AS_checkAvailabilityMediaRecorder (void)
 Check availability of MediaRecorder. More...
 

Detailed Description

CXD5602 Audio Recorder API.

Author
CXD5602 Audio SW Team