Skip to content
Discussion options

You must be logged in to vote

To adjust properties like the sample rate you can create an instance of AudioConverter using the following constructor:

- (nullable instancetype)initWithDecoder:(id <SFBPCMDecoding>)decoder encoder:(id <SFBPCMEncoding>)encoder requestedIntermediateFormat:(AVAudioFormat *(^ _Nullable)(AVAudioFormat *))intermediateFormatBlock error:(NSError **)error NS_DESIGNATED_INITIALIZER;

The proposed format passed to the block can be inspected and a different format returned if desired.

Further customization can also be accomplished by setting properties on the intermediate converter:

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by bjnortier
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants