I have scheduled 2 player nodes with same file to audio engine but sound waves are not correctly visualised in audacity. It is creating noise or silence in between. I am not understanding what this about. If i scheduled 2 different file or single file then it is perfectly working.
Use case - There are 2 player nodes connect to same audio engine and each player node scheduled with same audio file. Then it is not working as expected. Sound waves has error like SILENCE and mute for one of player node
Below is code snippet for reference
self.audioEngine = AVAudioEngine()
self.mainMixerNode = AVAudioMixerNode()
self.audioEngine.attach(self.mainMixerNode)
self.audioEngine.connect(mainMixerNode, to: self.audioEngine.outputNode, format: nil)
self.audioEngine.prepare()
try! audioEngine.start()
// Scheduling same file
playerNode.prepare(withFrameCount: AVAudioFrameCount(segmentFrameCount))
playerNode.scheduleSegment(audioFile, startingFrame: 0, frameCount: AVAudioFrameCount(segmentFrameCount), at: playerTime, completionHandler: nil)