Learn what Felgo offers to help your business succeed. Start your free evaluation today! Felgo for Your Business

Forums

OverviewFelgo 3 Support (Qt 5) › Audio isn't played

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #22525

    sAMA SAMA

    I have both audios:

    
    
    Audio{
                    id: win             //played when the right rectangle is chosen
                    source: "../android/assets/win.wav"
                }
                Audio{
                    id: lost                //played when the wrong rectangle is chosen
                    source: "../android/assets/lost.wav"
                }

     

    and they both should be played under these conditions:

     

    MouseArea{
                                        id: touch_handler
                                        anchors.fill: parent
                                        onClicked: {
                                            if (model.squareColor === pl){  //if rectangle color is correct
                                                win.play()    //win plays
                                            }
                                            else {
                                                lost.play()   //lost plays
                                            }
                                        }
                                    }

     

    why is that? I already added

    QT += multimedia multimediawidgets

    is there something else?

    #22533

    Alex
    Felgo Team

    Hi,

    what platform are you testing on? Is there any error message displayed, e.g. if the wav files maybe have an unsupported type.

    Cheers,
    Alex

    #22541

    sAMA SAMA

    alex.huber said:

    Hi,

    what platform are you testing on? Is there any error message displayed, e.g. if the wav files maybe have an unsupported type.

    Cheers,
    Alex

    Hi

    I’m testing it on android using the live client.

    There are no errors, I tried adding an mp3 file and didn’t work as well

    #22550

    Alex
    Felgo Team

    Ah, I just saw that you are putting the assets in the “android” folder. Is there any reason why? This folder is reserved for platform deployment specific files and is not sent to the Live Client. We recommend to put the files in the existing assets folder of your project.

    Cheers,
    Alex

Viewing 4 posts - 1 through 4 (of 4 total)

RSS feed for this thread

You must be logged in to reply to this topic.

Qt_Technology_Partner_RGB_475 Qt_Service_Partner_RGB_475_padded