-
Notifications
You must be signed in to change notification settings - Fork 385
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: [iOS] Implement custom audio source example (#481)
- Loading branch information
1 parent
e403f32
commit 044ae81
Showing
15 changed files
with
1,018 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
// | ||
// AudioController.h | ||
// AudioCapture | ||
// | ||
// Created by CavanSu on 10/11/2017. | ||
// Copyright © 2017 Agora. All rights reserved. | ||
// | ||
|
||
#import <Foundation/Foundation.h> | ||
#import <AVFoundation/AVFoundation.h> | ||
#import "AudioOptions.h" | ||
|
||
@class AudioController; | ||
@protocol AudioControllerDelegate <NSObject> | ||
@optional | ||
- (void)audioController:(AudioController *)controller | ||
didCaptureData:(unsigned char *)data | ||
bytesLength:(int)bytesLength; | ||
- (int)audioController:(AudioController *)controller | ||
didRenderData:(unsigned char *)data | ||
bytesLength:(int)bytesLength; | ||
- (void)audioController:(AudioController *)controller | ||
error:(OSStatus)error | ||
info:(NSString *)info; | ||
@end | ||
|
||
|
||
@interface AudioController : NSObject | ||
@property (nonatomic, weak) id<AudioControllerDelegate> delegate; | ||
|
||
+ (instancetype)audioController; | ||
- (void)setUpAudioSessionWithSampleRate:(int)sampleRate channelCount:(int)channelCount audioCRMode:(AudioCRMode)audioCRMode IOType:(IOUnitType)ioType; | ||
- (void)startWork; | ||
- (void)stopWork; | ||
@end |
Oops, something went wrong.