Skip to content

Commit

Permalink
feat: sys audio rec
Browse files Browse the repository at this point in the history
Signed-off-by: Lessica <[email protected]>
  • Loading branch information
Lessica committed Nov 23, 2024
1 parent dd17820 commit 3cca184
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
4 changes: 3 additions & 1 deletion cli/call-recorder.mm
Original file line number Diff line number Diff line change
Expand Up @@ -381,7 +381,9 @@ int main(int argc, const char *argv[]) {
}

NSString *channel = [[NSString stringWithUTF8String:argv[1]] lowercaseString];
if ([channel isEqualToString:@"mic"] || [channel isEqualToString:@"microphone"]) {
if ([channel isEqualToString:@"sys"] || [channel isEqualToString:@"system"]) {
mATAudioTapDescriptionPID = kATAudioTapDescriptionPIDSystemAudio;
} else if ([channel isEqualToString:@"mic"] || [channel isEqualToString:@"microphone"]) {
mATAudioTapDescriptionPID = kATAudioTapDescriptionPIDMicrophone;
} else if ([channel isEqualToString:@"speaker"]) {
mATAudioTapDescriptionPID = kATAudioTapDescriptionPIDSpeaker;
Expand Down
5 changes: 3 additions & 2 deletions include/ATAudioTapDescription.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
#import <AudioToolbox/AudioToolbox.h>

#define kATAudioTapDescriptionPIDMicrophone 0xFFFFFFFD
#define kATAudioTapDescriptionPIDSpeaker 0xFFFFFFFE
#define kATAudioTapDescriptionPIDMicrophone 0xFFFFFFFD // -3
#define kATAudioTapDescriptionPIDSpeaker 0xFFFFFFFE // -2
#define kATAudioTapDescriptionPIDSystemAudio 0xFFFFFFFF // -1

@interface ATAudioTapDescription : NSObject
- (instancetype)initTapInternalWithFormat:(AVAudioFormat *)arg1 PIDs:(id)arg2; // iOS 16+
Expand Down

0 comments on commit 3cca184

Please sign in to comment.