You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I try to use AKNodeRecorder to record mic data.
After i run record() method - i get this output in console:
[general] AKNodeRecorder.swift:record():114:Recording using format <AVAudioFormat 0x2817fe210: 2 ch, 48000 Hz, Float32, non-inter> (AKNodeRecorder.swift:record():114)
My session is setup for 48 kHz - AKSettings.sampleRate = 48000
After recording I try to save data but saved file have different sample rate
I try to use AKNodeRecorder to record mic data.
After i run record() method - i get this output in console:
[general] AKNodeRecorder.swift:record():114:Recording using format <AVAudioFormat 0x2817fe210: 2 ch, 48000 Hz, Float32, non-inter> (AKNodeRecorder.swift:record():114)
My session is setup for 48 kHz - AKSettings.sampleRate = 48000
After recording I try to save data but saved file have different sample rate
recorder.stop()
let tape = recorder.audioFile
print(tape?.fileFormat) // Optional(<AVAudioFormat 0x2821dd9f0: 2 ch, 48000 Hz, Float32, inter>)
print(tape?.processingFormat) // Optional(<AVAudioFormat 0x2821dd810: 2 ch, 48000 Hz, Float32, non-inter>)
tape?.exportAsynchronously(name: "name", baseDir: .documents, exportFormat: .m4a) {file, exportError in
if let error = exportError {
print("Export Failed (error)")
} else {
print("Export succeeded")
print(file?.fileFormat) //Optional(<AVAudioFormat 0x2821de2b0: 2 ch, 44100 Hz, 'aac ' (0x00000000) 0 bits/channel, 0 bytes/packet, 1024 frames/packet, 0 bytes/frame>)
print(file?.processingFormat) //Optional(<AVAudioFormat 0x2821dd9f0: 2 ch, 44100 Hz, Float32, non-inter>)
}
}
I have this problem only with m4a and mp4 format. With caf, aif and wav - format is 48 kHz
The text was updated successfully, but these errors were encountered: