From 469e79cae6414ed5bfd87d4db5c8696c94f0c583 Mon Sep 17 00:00:00 2001 From: Dylan Whichard Date: Mon, 8 Jul 2024 19:10:46 -0700 Subject: [PATCH] I know how many bits are in a byte --- CNFA_coreaudio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CNFA_coreaudio.c b/CNFA_coreaudio.c index 5fd4e54..7a941f6 100644 --- a/CNFA_coreaudio.c +++ b/CNFA_coreaudio.c @@ -180,7 +180,7 @@ void * InitCNFACoreAudio( CNFACBType cb, const char * your_name, int reqSPSPlay, recDesc.mFormatID = kAudioFormatLinearPCM; recDesc.mFormatFlags = kLinearPCMFormatFlagIsSignedInteger | kAudioFormatFlagIsPacked; recDesc.mSampleRate = r->spsRec; - recDesc.mBitsPerChannel = sizeof(short); + recDesc.mBitsPerChannel = 8 * sizeof(short); recDesc.mChannelsPerFrame = r->channelsRec; // Bytes per channel, multiplied by number of channels recDesc.mBytesPerFrame = recDesc.mChannelsPerFrame * (recDesc.mBitsPerChannel / 8);