0

Im working on an app that records audio using expo and makes use of the metering value

I was using version 10, and have just updated to version 12,

However after doing so, the metering value is always undefined, despite setting isMeteringEnabled to true, and it should have already been true from that preset anyway

Im running this on web, have not yet tested on native

await Audio.setAudioModeAsync({
  allowsRecordingIOS: true,
  interruptionModeIOS: 1,
  playsInSilentModeIOS: true,
  shouldDuckAndroid: false,
  interruptionModeAndroid: 1,
  playThroughEarpieceAndroid: false,
  staysActiveInBackground: true
})

const recording = new Audio.Recording()

await recording.prepareToRecordAsync({
  ...Audio.RecordingOptionsPresets.HIGH_QUALITY,
  isMeteringEnabled: true
})

recording.setOnRecordingStatusUpdate((status: RecordingStatus) => {
  console.log(status.metering) // undefined
})
Alex
  • 81
  • 3

1 Answers1

0

Sadly it seems it's a widespread issue: https://github.com/expo/expo/issues/19515

You can try deploying to iOS and check if the code checks out. Wish I had better news, good luck!

Catzzye
  • 3
  • 4