美摄SDK For iOS  3.14.0
NvsCustomAudioFx.h
浏览该文件的文档.
1 //================================================================================
2 //
3 // (c) Copyright Meishe Co. Ltd, 2017. All rights reserved.
4 //
5 // This code and information is provided "as is" without warranty of any kind,
6 // either expressed or implied, including but not limited to the implied
7 // warranties of merchantability and/or fitness for a particular purpose.
8 //
9 //--------------------------------------------------------------------------------
10 // Birth Date: Jul 20. 2017
11 // Author: Meishe video team
12 //================================================================================
13 #pragma once
14 
15 #import <Foundation/Foundation.h>
16 #import "NvsCommonDef.h"
17 #import <CoreMedia/CMSampleBuffer.h>
18 
20  CMSampleBufferRef inputAudioSamples;
21  int64_t effectTime;
22  int64_t effectStartTime;
23  int64_t effectEndTime;
24 };
25 
26 typedef enum {
30 
39 @protocol NvsCustomAudioFxRenderer <NSObject>
40 
51 - (void)didInit;
52 
64 
75 - (void)didCleanup;
76 
88 - (NvsCustomAudioFxRenderError)didRender:(struct NvsCustomAudioFxRenderContext *)renderContext outputSamples:(CMSampleBufferRef*)outputSamplesBuffer;
89 
96 - (NvsCustomAudioFxRenderError)didFlushWithOutputSample:(CMSampleBufferRef*)outputSamplesBuffer;
97 
98 @end
99 
100 
NvsCustomAudioFxRenderError_NoError
@ NvsCustomAudioFxRenderError_NoError
Definition: NvsCustomAudioFx.h:27
NvsCustomAudioFxRenderer-p
自定义音频特效渲染器接口
Definition: NvsCustomAudioFx.h:39
NvsCustomAudioFxRenderError_Unknown
@ NvsCustomAudioFxRenderError_Unknown
Definition: NvsCustomAudioFx.h:28
-[NvsCustomAudioFxRenderer-p didInit]
void didInit()
美摄SDK对自定义音频特效调用此方法以便让用户初始化一些资源
NvsCustomAudioFxRenderContext::effectEndTime
int64_t effectEndTime
特效终止时间(单位微秒)
Definition: NvsCustomAudioFx.h:23
-[NvsCustomAudioFxRenderer-p didQuerySupportedInputAudioSampleFormat]
NvsAudioSampleFormat didQuerySupportedInputAudioSampleFormat()
美摄SDK对自定义音频特效调用此方法以便让SDK知道自定义音频特效希望得到的音频格式
-[NvsCustomAudioFxRenderer-p didCleanup]
void didCleanup()
美摄SDK对自定义音频特效调用此方法以便让用户清理资源
NvsCustomAudioFxRenderContext::effectStartTime
int64_t effectStartTime
特效起始时间(单位微秒)
Definition: NvsCustomAudioFx.h:22
NvsAudioSampleFormat
NvsAudioSampleFormat
音频采样格式
Definition: NvsCommonDef.h:28
NvsCommonDef.h
NvsCustomAudioFxRenderContext::inputAudioSamples
CMSampleBufferRef inputAudioSamples
输入音频数据
Definition: NvsCustomAudioFx.h:20
NvsCustomAudioFxRenderContext::effectTime
int64_t effectTime
特效时间(单位微秒)
Definition: NvsCustomAudioFx.h:21
NvsCustomAudioFxRenderContext
Definition: NvsCustomAudioFx.h:19
NvsCustomAudioFxRenderError
NvsCustomAudioFxRenderError
Definition: NvsCustomAudioFx.h:26