No Audio even after amixer

  1. 3 months ago

    Alexandre A

    May 31 Pre-Release Testers, Xojo Pro
    Edited 3 months ago

    I am trying to make a audiolooper in raspberry using xojo, to output in headphone jack
    Even after using:

    Dim sh As New Shell
    sh.Execute("sudo amixer cset numid=3 1")

    I get no audio at all.
    This is my code:

    if voz <> nil and voz.IsPlaying then
      voz.Stop
    end if
    
    dim f as FolderItem
    
    f=getFolderItem(audiofile.text,FolderItem.PathTypeNative)
    if f <> nil  then
    
      dim s as sound 
      s= f.OpenAsSound
      If s <> Nil Then
        voz=s
        msgbox "should play "+f.DisplayName
        voz.PlayLooping
      
      Else
        // check f.LastErrorCode
        msgbox f.LastErrorCode.ToText
      End If
    Else
      // user cancelled
    End If

    Playing the sound file with any audio player works fine.

    I already updated and upgraded raspberry pi
    I am using remote debug. So I am not running app as sudo. But it asks for user password when running the shell command... is this a problem?

    Is there something I am doing wrong? Is it a raspberry pi limitation?
    Please help, I already read everything I found about the subject and I cannot find solution
    thanks

or Sign Up to reply!