Skip to content

Commit 57eefcc

Browse files
style(mobile): align the iOS audio format call
1 parent 002bc92 commit 57eefcc

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

‎apps/mobile/modules/t3-voice-transcription/ios/T3VoiceTranscriptionModule.swift‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@ public class T3VoiceTranscriptionModule: Module {
1717
mFormatFlags: kAudioFormatFlagIsSignedInteger | kAudioFormatFlagIsPacked,
1818
mBytesPerPacket: 2, mFramesPerPacket: 1, mBytesPerFrame: 2,
1919
mChannelsPerFrame: 1, mBitsPerChannel: 16, mReserved: 0)
20-
try check(ExtAudioFileSetProperty(file, kExtAudioFileProperty_ClientDataFormat,
21-
UInt32(MemoryLayout.size(ofValue: format)), &format))
20+
let formatSize = UInt32(MemoryLayout<AudioStreamBasicDescription>.size)
21+
try check(ExtAudioFileSetProperty(file, kExtAudioFileProperty_ClientDataFormat, formatSize, &format))
2222
var pcm = Data()
2323
var chunk = [Int16](repeating: 0, count: 8192)
2424
try chunk.withUnsafeMutableBytes { bytes in

0 commit comments

Comments
 (0)