simplify recorder

This commit is contained in:
Nick Payne
2025-08-12 13:37:39 +01:00
parent 8b3de5918c
commit a311cc583f
4 changed files with 16 additions and 35 deletions
+2 -1
View File
@@ -133,7 +133,8 @@ public class AudioFormatConverter {
targetFormat.mFramesPerPacket = 1
targetFormat.mBitsPerChannel = 16
targetFormat.mChannelsPerFrame = sourceFormat.mChannelsPerFrame
targetFormat.mBytesPerFrame = (targetFormat.mBitsPerChannel / 8) * sourceFormat.mChannelsPerFrame
targetFormat.mBytesPerFrame =
(targetFormat.mBitsPerChannel / 8) * sourceFormat.mChannelsPerFrame
targetFormat.mBytesPerPacket = targetFormat.mFramesPerPacket * targetFormat.mBytesPerFrame
return try AudioFormatConverter(sourceFormat: sourceFormat, targetFormat: targetFormat)