Posts

Post not yet marked as solved
0 Replies
233 Views
Hi, Not sure if this is by design or not, but whenever I connect a Bluetooth device to the app the AU callback stops producing frames for several seconds until the device is connected. I'm building a recording app that uses AVAssetWriter with fragmented segments (HLS buffers). When the callback freezes it suppose to create a gap in the audio but for some reason, the segment that is created does not contain an audio gap, and the audio just "jumps" in timestamps.
Posted
by YYfim.
Last updated
.
Post not yet marked as solved
1 Replies
323 Views
Hi, I'm capturing Audio and Video using AVFoundation's AVCaptureSession using the AVCaptureVideoDataOutputSampleBufferDelegate & AVCaptureAudioDataOutputSampleBufferDelegate to collect CMSampleBuffers and write them to file using AVAssetWriter. The issues I'm facing is that while recording if the user goes to the background and returns, the CMSampleBuffer's AudioFormat changes from: this FormatList Array: { Index: 0 ChannelLayoutTag: 0x640001 ASBD: { mSampleRate: 48000.000000 mFormatID: 'lpcm' mFormatFlags: 0xc mBytesPerPacket: 2 mFramesPerPacket: 1 mBytesPerFrame: 2 mChannelsPerFrame: 1 mBitsPerChannel: 16 }} to this: FormatList Array: { Index: 0 ChannelLayoutTag: 0x640001 ASBD: { mSampleRate: 48000.000000 mFormatID: 'lpcm' mFormatFlags: 0xc mBytesPerPacket: 8 mFramesPerPacket: 1 mBytesPerFrame: 8 mChannelsPerFrame: 4 mBitsPerChannel: 16 }} This obviously creates an issue with the AudioInput in the AVAssetWriter and fails the writing Does anyone have an idea what going on? As to the CaptureSession setup: Inputs: Front / back camera & internal microphone outputs: AVCaptureVideoDataOutput & AVCaptureAudioDataOutput I am changing the active format in the videoInput's device when I start the session Thanks, Yoav
Posted
by YYfim.
Last updated
.