I work with two application modules:
1) A recording module with this audioSession setting:
try audioSession.setCategory(AVAudioSessionCategoryRecord)
try audioSession.setMode(AVAudioSessionModeMeasurement)
try audioSession.setPreferredIOBufferDuration(0.05)
try self.audioSession.setActive(true)
2) A recording module with this audioSession setting:
try audioSession.setCategory(AVAudioSessionCategoryPlayback)
try audioSession.setMode(AVAudioSessionModeDefault)
try self.audioSession.setActive(true)
For each transition from 1-> 2 and 2-1 we have a try self.audioSession.setActive(false)
If I go from 1) module to 2) or repeat 1) everything works fine. Then, if from 2) I came to 1) I get this error ontry self.audioSession.setActive(true)
This is mistake:
ERROR: [0x16e10b000] >avae> AVAudioIONodeImpl.mm:365:
_GetHWFormat: required condition is false: hwFormat
What is the reason for this error? I can't find any help in the Apple iOS documentation to figure out where the problem is.
Does anyone have any advice?
source
share