Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. Audio item fails to play sporadically on android
Forum Updated to NodeBB v4.3 + New Features

Audio item fails to play sporadically on android

Scheduled Pinned Locked Moved Mobile and Embedded
1 Posts 1 Posters 503 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    simgunz
    wrote on last edited by
    #1

    I'm using an Audio Item to play a short wav audio track. When a mouse area is clicked the togglePlay method is called and the audio begins to play. On the desktop version of the app everything is working fine, while on android the audio sometimes fails to play, i.e. I hear no sound, but the audio item playbackstate is PlayingState and remains in this state forever. This usually happens the first time I try to play the audio, while it works the successive times, but is not deterministic.
    Any sugesstion on how to solve this problem?

    @
    function togglePlay() {
    if(audioItem.playbackState == Audio.StoppedState) {
    audioItem.play()
    playingBegin()
    } else {
    audioItem.stop()
    }
    }
    @

    1 Reply Last reply
    0

    • Login

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Get Qt Extensions
    • Unsolved