You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm currently working on a project targeting Mac, we recently migrated to .NET 8 and our audio recording functionality broke. While the audio file is created with the correct duration, it produces no sound upon playback.
My first assumption was that AVAudioSession wasn't selecting the correct device, but is not the case.
We're using AVAudioRecorder for audio recording. To troubleshoot, I also experimented with AVCapture and AVAudioEngine, but the outcome remained the same
Here is a snip of our code:
AVAudioRecorder _audioRecorder;
NSError _error;
var session = AVAudioSession.SharedInstance();
if(session is not null)
{
session.SetActive(true);
session.SetCategory(AVAudioSessionCategory.PlayAndRecord);
}
var settings = new AudioSettings
{
Format = AudioFormatType.MPEG4AAC,
SampleRate = 44100.0f,
NumberChannels = 1,
AudioQuality = AVAudioQuality.High
};
_audioRecorder = AVAudioRecorder.Create(NSUrl.FromFilename(_filePath), settings, out error);
_audioRecorder.Record();
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
I'm currently working on a project targeting Mac, we recently migrated to .NET 8 and our audio recording functionality broke. While the audio file is created with the correct duration, it produces no sound upon playback.
My first assumption was that AVAudioSession wasn't selecting the correct device, but is not the case.
We're using AVAudioRecorder for audio recording. To troubleshoot, I also experimented with AVCapture and AVAudioEngine, but the outcome remained the same
Here is a snip of our code:
Any ideas?
Thanks
Beta Was this translation helpful? Give feedback.
All reactions