Open MaikelW opened 3 months ago
What version are you using?
I would expect the sounds to play but there are some things that you can check:
I'm using version 3.0.0. Double checked if my system was muted, which wasn't the case. Also implemented those playback options, but still no sound unfortunately...
I am not sure here, I can confirm that using the CreatePlayer method and playing the recording through that player works as expected.
Weird... Could you send me your example to see if I can get that to work? And are you using Razor pages?
Weird... Could you send me your example to see if I can get that to work? And are you using Razor pages?
It's just using the sample app in this repository. It's not using Razor pages, just plain MAUI but the playback code is agnostic to the UI framework so it should work in Razor. It just won't render the playback controls for you
I'll get the sample app up and running and will then come back to you. Thanks for your help so far!
Seems to be working just fine in the sample app indeed. I'll see if I can figure out why it's not working in my razor pages app.
Good luck and let us know how you get on
Alright, I think it might have something to do with the thread that is responsible for playing the audio. When I record and play back the audio multiple times in a row, sometimes it works. Might be interesting to see if someone else also experiences this behavior when using razor pages.
I'm using razor pages and am also facing this issue. Did you manage to get it working? @MaikelW
I checked the generated file from the audio recorder, the entire file basically just contains silence (a bunch of 0s in the hex data except the header), but with correct duration, it's as if the microphone was not used somehow but the bytes are being streamed to the file. The yellow microphone icon at the top right
<< expected to see this icon but did not
didn't even show up during recording.
And like @MaikelW , I also tried the official sample project and it works fine.
Nope, unfortunately I wasn't able to fix the issue in my razor pages project. But I'm indeed experiencing the exact same thing as you are @Khongchai. Sometimes the audio file is indeed filled with just 0s, but with the correct duration.
It's fixed now. I've searched hours. To solve it, put this into your entitlements.plist
<key>com.apple.security.device.audio-input</key>
<true/>
I'm using Blazor Hybrid with Razor pages and have some issues with playing back recorded audio on Mac. It looks like recording works fine, since the audio control loads the audio stream successfully and displays its length in seconds. However, when playing back the audio, no sound is being produced. What could the issue be?
AudioService.cs
Home.razor