Skip to content

Commit

Permalink
Merge pull request #78 from ShengQiangLiu/v5.2.6
Browse files Browse the repository at this point in the history
v5.2.6
  • Loading branch information
HeraShowFeng authored Oct 20, 2023
2 parents 2a67cba + b0bb212 commit d597f5a
Show file tree
Hide file tree
Showing 52 changed files with 901 additions and 582 deletions.
Binary file added .DS_Store
Binary file not shown.
47 changes: 47 additions & 0 deletions APIDiffs/api-diffs-5.2.6.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
# QNRTCKit 5.2.5 to 5.2.6 API Differences

## General Headers

```
QNMicrophoneAudioTrack
```

- *Deleted* method `- (QNAudioMusicMixer *)createAudioMusicMixer:(NSString *)musicPath musicMixerDelegate:(id<QNAudioMusicMixerDelegate>)musicMixerDelegate;`
- *Deleted* method `- (void)destroyAudioMusicMixer;`
- *Deleted* method `- (QNAudioEffectMixer *)createAudioEffectMixer:(id<QNAudioEffectMixerDelegate>)effectMixerDelegate;`
- *Deleted* method `- (void)destroyAudioEffectMixer;`
- *Deleted* method `- (QNAudioSourceMixer *)createAudioSourceMixer:(id<QNAudioSourceMixerDelegate>)sourceMixerDelegate;`
- *Deleted* method `- (void)destroyAudioSourceMixer;`
- *Deleted* method `- (void)setEarMonitorEnabled:(BOOL)enabled;`
- *Deleted* method `- (BOOL)getEarMonitorEnabled;`
- *Deleted* method `- (void)setPlayingVolume:(float)volume;`
- *Deleted* method `- (float)getPlayingVolume;`


```
QNLocalAudioTrack
```

- *Added* method `- (void)setEarMonitorEnabled:(BOOL)enabled;`
- *Added* method `- (BOOL)getEarMonitorEnabled;`
- *Added* method `- (void)setPlayingVolume:(float)volume;`
- *Added* method `- (float)getPlayingVolume;`
- *Added* method `- (BOOL)addAudioFilter:(id<QNAudioFilterProtocol>)filter;`
- *Added* method `- (BOOL)removeAudioFilter:(id<QNAudioFilterProtocol>)filter;`

```
QNRTC
```

- *Added* method `+ (QNAudioMusicMixer *)createAudioMusicMixer:(NSString *)musicPath musicMixerDelegate:(id<QNAudioMusicMixerDelegate>)musicMixerDelegate;`
- *Added* method `+ (void)destroyAudioMusicMixer:(QNAudioMusicMixer*)mixer;`
- *Added* method `+ (QNAudioEffectMixer *)createAudioEffectMixer:(id<QNAudioEffectMixerDelegate>)effectMixerDelegate;`
- *Added* method `+ (void)destroyAudioEffectMixer:(QNAudioEffectMixer*)mixer;`
- *Added* method `+ (QNAudioSourceMixer *)createAudioSourceMixer:(id<QNAudioSourceMixerDelegate>)sourceMixerDelegate;`
- *Added* method `+ (void)destroyAudioSourceMixer:(QNAudioSourceMixer*)mixer;`

```
QNRTCClient
```
- *Added* method `- (void)RTCClient:(QNRTCClient *)client didUserVolumeIndication:(NSArray<QNAudioVolumeInfo *>*)userVolumeList;`
- *Added* method `- (void)enableAudioVolumeIndication:(int)interval;`
Binary file added Pod/.DS_Store
Binary file not shown.
Binary file added Pod/iphoneos/.DS_Store
Binary file not shown.
2 changes: 1 addition & 1 deletion Pod/iphoneos/QNRTCKit.framework.dSYM/Contents/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleShortVersionString</key>
<string>5.2.5</string>
<string>5.2.6</string>
<key>CFBundleVersion</key>
<string>1</string>
</dict>
Expand Down
Binary file not shown.
Binary file added Pod/iphoneos/QNRTCKit.framework/.DS_Store
Binary file not shown.
3 changes: 2 additions & 1 deletion Pod/iphoneos/QNRTCKit.framework/Headers/QNAudioEffectMixer.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@

#import <Foundation/Foundation.h>
#import "QNTypeDefines.h"
#import "QNAudioFilterProtocol.h"

NS_ASSUME_NONNULL_BEGIN

Expand Down Expand Up @@ -121,7 +122,7 @@ NS_ASSUME_NONNULL_BEGIN
- (void)audioEffect:(QNAudioEffect *)audioEffect didFinished:(int)effectID;
@end

@interface QNAudioEffectMixer : NSObject
@interface QNAudioEffectMixer : NSObject <QNAudioFilterProtocol>

/*!
* @abstract 创建音效类
Expand Down
52 changes: 52 additions & 0 deletions Pod/iphoneos/QNRTCKit.framework/Headers/QNAudioFilterProtocol.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
//
// QNAudioFilterProtocol.h
// QNRTCKit
//
// Created by ShengQiang'Liu on 2023/8/22.
// Copyright © 2023 Pili Engineering, Qiniu Inc. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "QNAudioFrame.h"

NS_ASSUME_NONNULL_BEGIN

@protocol QNAudioFilterProtocol <NSObject>

/**
* Audio frame 处理.
* @param inAudioFrame 需要处理的 audio frame.
* @param adaptedFrame 处理完的 audio frame.
* @return
* - `true`: Success.
* - `false`: Failure. 丢弃 audio frame.
*/
- (BOOL)adaptAudioFrame:(const QNAudioFrame *)inAudioFrame adaptedFrame:(QNAudioFrame *)adaptedFrame;

/**
* 获取 QNAudioFilter 类的标识名称
*
* @return
* - 标识名称
*/
- (const NSString *)getName;

/**
* 开启或者关闭当前 filter.
* @param enable 是否开启 filter:
* - `true`: 开启.
* - `false`: 关闭.
*/
- (void)setEnabled:(BOOL)enable;

/**
* 检查当前 Filter 是否开启.
* @return
* - `true`: 已开启.
* - `false`: 已关闭.
*/
- (BOOL)isEnabled;

@end

NS_ASSUME_NONNULL_END
33 changes: 33 additions & 0 deletions Pod/iphoneos/QNRTCKit.framework/Headers/QNAudioFrame.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
//
// QNAudioFrame.h
// QNRTCKit
//
// Created by ShengQiang'Liu on 2023/9/7.
// Copyright © 2023 Pili Engineering, Qiniu Inc. All rights reserved.
//

#import <Foundation/Foundation.h>

NS_ASSUME_NONNULL_BEGIN

enum QNBytesPerSample {
kTwoBytesPerSample = 2,
};

// Stereo, 32 kHz, 120 ms (2 * 32 * 120)
static const int kQNMaxDataSizeSamples = 7680;
static const int kQNMaxDataSizeBytes = kQNMaxDataSizeSamples * sizeof(int16_t);

@interface QNAudioFrame : NSObject

@property (nonatomic, assign) uint32_t captureTimestamp;
@property (nonatomic, assign) size_t samplesPerChannel;
@property (nonatomic, assign) int sampleRateHz;
@property (nonatomic, assign) size_t numChannels;
@property (nonatomic, assign, readonly) enum QNBytesPerSample bytePerSample;
// 最大 size 为 kQNMaxDataSizeBytes
@property (nonatomic, strong) NSData *data;

@end

NS_ASSUME_NONNULL_END
3 changes: 2 additions & 1 deletion Pod/iphoneos/QNRTCKit.framework/Headers/QNAudioMusicMixer.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@

#import <Foundation/Foundation.h>
#import "QNTypeDefines.h"
#import "QNAudioFilterProtocol.h"

NS_ASSUME_NONNULL_BEGIN

Expand Down Expand Up @@ -53,7 +54,7 @@ NS_ASSUME_NONNULL_BEGIN
@end


@interface QNAudioMusicMixer : NSObject
@interface QNAudioMusicMixer : NSObject <QNAudioFilterProtocol>

/*!
* @abstract 设置是否推送到远端
Expand Down
3 changes: 2 additions & 1 deletion Pod/iphoneos/QNRTCKit.framework/Headers/QNAudioSourceMixer.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@

#import <Foundation/Foundation.h>
#import "QNTypeDefines.h"
#import "QNAudioFilterProtocol.h"

NS_ASSUME_NONNULL_BEGIN

Expand Down Expand Up @@ -41,7 +42,7 @@ NS_ASSUME_NONNULL_BEGIN

@end

@interface QNAudioSourceMixer : NSObject
@interface QNAudioSourceMixer : NSObject <QNAudioFilterProtocol>

/*!
* @abstract 创建音源类,默认关闭阻塞模式
Expand Down
29 changes: 29 additions & 0 deletions Pod/iphoneos/QNRTCKit.framework/Headers/QNAudioVolumeInfo.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
//
// QNAudioVolumeInfo.h
// QNRTCKit
//
// Created by 冯文秀 on 2023/5/18.
// Copyright © 2023 Pili Engineering, Qiniu Inc. All rights reserved.
//

#import <Foundation/Foundation.h>

NS_ASSUME_NONNULL_BEGIN

@interface QNAudioVolumeInfo : NSObject
/*!
* @abstract 用户 ID
*
* @since v5.2.3
*/
@property (nonatomic, readonly) NSString *userID;

/*!
* @abstract 用户实时音量
*
* @since v5.2.3
*/
@property (nonatomic, readonly) float volume;
@end

NS_ASSUME_NONNULL_END
52 changes: 52 additions & 0 deletions Pod/iphoneos/QNRTCKit.framework/Headers/QNRTC.h
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,58 @@ NS_ASSUME_NONNULL_BEGIN
*/
+ (QNCustomVideoTrack *)createCustomVideoTrackWithConfig:(QNCustomVideoTrackConfig *)configuration;

/*!
* @abstract 创建背景音乐混音对象实例
*
* @param musicPath 背景音乐路径,支持本地路径及在线文件
*
* @param musicMixerDelegate 背景音乐混音回调代理
*
* @return QNAudioMusicMixer 对象实例
*
* @since v5.2.6
*/
+ (QNAudioMusicMixer *)createAudioMusicMixer:(NSString *)musicPath musicMixerDelegate:(id<QNAudioMusicMixerDelegate>)musicMixerDelegate;

/*!
* @abstract 销毁背景音乐混音对象实例
*
* @since v5.2.6
*/
+ (void)destroyAudioMusicMixer:(QNAudioMusicMixer*)mixer;

/*!
* @abstract 创建音效混音对象实例
*
* @param effectMixerDelegate 音效混音回调代理
*
* @since v5.2.6
*/
+ (QNAudioEffectMixer *)createAudioEffectMixer:(id<QNAudioEffectMixerDelegate>)effectMixerDelegate;

/*!
* @abstract 销毁音效混音对象实例
*
* @since v5.2.6
*/
+ (void)destroyAudioEffectMixer:(QNAudioEffectMixer*)mixer;

/*!
* @abstract 创建音源混音对象实例
*
* @param sourceMixerDelegate 音源混音回调代理
*
* @since v5.2.6
*/
+ (QNAudioSourceMixer *)createAudioSourceMixer:(id<QNAudioSourceMixerDelegate>)sourceMixerDelegate;

/*!
* @abstract 销毁音源混音对象实例
*
* @since v5.2.6
*/
+ (void)destroyAudioSourceMixer:(QNAudioSourceMixer*)mixer;

@end

#pragma mark - Category (Audio)
Expand Down
19 changes: 19 additions & 0 deletions Pod/iphoneos/QNRTCKit.framework/Headers/QNRTCClient.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
#import "QNTrack.h"
#import "QNMessageInfo.h"
#import "QNTypeDefines.h"
#import "QNAudioVolumeInfo.h"

@class QNRTCClient;
@class QNRemoteTrack;
Expand Down Expand Up @@ -171,6 +172,15 @@ NS_ASSUME_NONNULL_BEGIN
*/
- (void)RTCClient:(QNRTCClient *)client didNetworkQualityNotified:(QNNetworkQuality *)quality;

/*!
* @abstract 用户音量提示回调,本地远端一起回调,本地 user id 为空。
*
* @param userVolumeList 用户音量信息,按音量由高到低排序
*
* @since v5.2.6
*/
- (void)RTCClient:(QNRTCClient *)client didUserVolumeIndication:(NSArray<QNAudioVolumeInfo *>*)userVolumeList;

@end


Expand Down Expand Up @@ -422,6 +432,15 @@ NS_ASSUME_NONNULL_BEGIN
*/
- (NSDictionary *)getLocalAudioTrackStats;

/**
* 开启语音音量监测
*
* @param interval 指定音量提示的时间间隔,≤ 0: 禁用音量提示功能,> 0: 音量提示的间隔,单位为毫秒,最小取值为 100。
*
* @since v5.2.6
*/
- (void)enableAudioVolumeIndication:(int)interval;

@end

NS_ASSUME_NONNULL_END
1 change: 1 addition & 0 deletions Pod/iphoneos/QNRTCKit.framework/Headers/QNRTCKit.h
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ FOUNDATION_EXPORT const unsigned char QNRTCKitVersionString[];
#import <QNRTCKit/QNClientConfig.h>
#import <QNRTCKit/QNAudioMusicMixer.h>
#import <QNRTCKit/QNAudioEffectMixer.h>
#import <QNRTCKit/QNAudioVolumeInfo.h>



Loading

0 comments on commit d597f5a

Please sign in to comment.