Quick Links: Download Gideros Studio | Gideros Documentation | Gideros Development Center | Gideros community chat | DONATE
Media/audio capture w/ Visual Studio — Gideros Forum

Media/audio capture w/ Visual Studio

This may not be Gideros related, but it probably is. (Sorry if it isn't)

Continuous troubles with the microphone plugin.
I suppose UWP support (win32) was added last Gideros update, since it now builds fine in Visual Studio (it didn't before, thanks for the update!). However, the app crashes when calling microphone:start()

VS debug output gives me
Exception thrown at 0x00007FFB3B59537C (KernelBase.dll) in giderosgame.Windows.exe: WinRT originate error - 0xC00D36B3 : 'The stream number provided was invalid.'.

followed by a few
Exception thrown at 0x00007FFB3B59537C (KernelBase.dll) in giderosgame.Windows.exe: WinRT originate error - 0xC00DABE0 : 'No capture devices are available.'.

and a last
Exception thrown at 0x00007FF69E2868A3 in giderosgame.Windows.exe: 0xC0000005: Access violation writing location 0x0000000000000000.

It seems the exceptions are related to media capture because others have had the same issues seemingly using mostly camera capture other platforms with UWP (Unity, OpenCV, Intel Realsense etc).

Using the app's microphone from exe files out of Windows Desktop (QT) or win32 exports works fine.

Comments

  • hgy29hgy29 Maintainer
    Well, I added microphone plugin for UWP last time, but I couldn't actually test it before release because my web camera died some time between my last video conference call and my attempt at writing a UWP driver for the microphone. I thought I couldn't try with a regular microphone plugged in the MIC input of my PC, but no it seems that UWP media capture framework don't count it as a microphone.
    I'll do some more tests on it today, since I got a new web camera!

    Likes: saeys

    +1 -1 (+1 / -0 )Share on Facebook
  • hgy29hgy29 Maintainer
    Accepted Answer
    Ok, found a few issues, they'll be fixed for next release. It seems to work now with my webcam. https://github.com/gideros/openal-soft/commit/03a2969020c42d06ab8e8640976ea122d0ade1b0

    Likes: pie, saeys

    +1 -1 (+2 / -0 )Share on Facebook
  • saeyssaeys Member
    Awsome, thank you! Looking forward to test it myself.
  • saeyssaeys Member
    I can now export UWP, build and play in VS since 2023.4 with no crashes. Yaay! B)

    However, when playing back the recorded sound the pitch is down by about half the frequency. It sounds like the original recording (at 44100 kHz sample rate) is interpreted as a 22050 kHz sample rate sound (then saved as a 44100 kHz). (Recording from the same audio source with an other recording application works fine)
    Also, the sound file get trimmed so ~85% of the recorded time are cut.

    And movieclips still seems to be played faster than the intended 60 fps.

    (This applies to UWP only it seems)
  • hgy29hgy29 Maintainer
    I still didn't find the issue with MovieClip (coudln't reproduce), but about recorded audio, did you ask for mono or stereo ? it seems that UWP can only record mono from mics, but if you ask stereo gideros will encode it as stereo. Actually we don't have much control at UWP side about what will be recorded, so you can't even ask for 22050 smp/s. Does it work if you stick to 44100/Mono ?
  • saeyssaeys Member
    microphone = Microphone.new(application:getDeviceName(), 44100, 1, 16)
    Yep, mono.

    This isn't an issue with win desktop or win32 exports, so maybe something happens on the VS side? Then I guess I need to dig deeper into that.

    I'll try to reproduce the MovieClip issue with a cleaner code. Later on... :-)
Sign In or Register to comment.