Created
February 27, 2019 00:14
-
-
Save mixflame/024703c4dcb226ace189c8e6379e20f1 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
AudioChannelLayout channelLayout; | |
memset(&channelLayout, 0, sizeof(AudioChannelLayout)); | |
channelLayout.mChannelLayoutTag = kAudioChannelLayoutTag_Stereo; | |
NSDictionary *outputSettings = | |
[NSDictionary dictionaryWithObjectsAndKeys: | |
[NSNumber numberWithInt:kAudioFormatLinearPCM], AVFormatIDKey, | |
[NSNumber numberWithFloat:44100.0], AVSampleRateKey, | |
[NSNumber numberWithInt:2], AVNumberOfChannelsKey, | |
[NSData dataWithBytes:&channelLayout length:sizeof(AudioChannelLayout)], | |
AVChannelLayoutKey, | |
[NSNumber numberWithInt:16], AVLinearPCMBitDepthKey, | |
[NSNumber numberWithBool:NO], AVLinearPCMIsNonInterleaved, | |
[NSNumber numberWithBool:NO],AVLinearPCMIsFloatKey, | |
[NSNumber numberWithBool:NO], AVLinearPCMIsBigEndianKey, | |
nil]; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment