Skip to content

[iOS] Recorder does not initialise without AudioSession properties set #804

@marksyzm

Description

@marksyzm

Description

Just trying to get worklets going and I had to run the app to see why I couldn't get AudioBuffer data. Turns out it was this:

AVAEInternal.h:83 required condition is false: [AVAudioEngineGraph.mm:1419:Initialize: (IsFormatSampleRateAndChannelCountValid(inputHWFormat))]

Which means that the session category or mode isn't set. By doing this, I managed to get it to work.

        AudioManager.setAudioSessionOptions({
          iosCategory: "playAndRecord",
          iosMode: "measurement",
          iosOptions: ["mixWithOthers"],
        })

All going well so far, otherwise.

Steps to reproduce

  1. set up AudioRecorder in iOS 26.1, connect up worklet
  2. start the recorder instance
  3. no data received in recorder.onAudioReady() or WorkletNode

Snack or a link to a repository

https://github.com/marksyzm/scratch-audio

React Native Audio API version

0.10.1

React Native version

0.81.5

Platforms

iOS

JavaScript runtime

Hermes

Workflow

Expo Dev Client

Architecture

Fabric (New Architecture)

Build type

Debug app & dev bundle

Device

Real device

Device model

iPhone 16 Pro

Acknowledgements

Yes

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions