17 Replies
      Latest reply on Jul 3, 2019 11:15 PM by Trumpeter
      Nadir Level 1 Level 1 (0 points)

        Hi All,

         

        I'm working with two application modules:

         

        1) Recording module with this audioSession setup:

         

         

        try audioSession.setCategory(AVAudioSessionCategoryRecord)
            try audioSession.setMode(AVAudioSessionModeMeasurement)
            try audioSession.setPreferredIOBufferDuration(0.05)
            try self.audioSession.setActive(true)
        

         

         

        2) Recording module with this audioSession setup:

         

            try audioSession.setCategory(AVAudioSessionCategoryPlayback)
            try audioSession.setMode(AVAudioSessionModeDefault)
            try self.audioSession.setActive(true)
        

         

         

        For each passage from 1->2 and 2-1 I have a

        try self.audioSession.setActive(false)
        

         

        If I pass from 1) module to 2) or redo 1) all works fine. Than if from 2) I come to 1) I get this error on

        try self.audioSession.setActive(true)
        

         

         

        This is the error:

         

            ERROR:    [0x16e10b000] >avae> AVAudioIONodeImpl.mm:365:

            _GetHWFormat: required condition is false: hwFormat

         

         

        What is this error related to? I can't find any help on Apple iOS documentation to understand where the problem can be.

         

         

        Does anybody have any tip?