Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. SoundEffect play() is making error 'QAudioOutput: open error'

SoundEffect play() is making error 'QAudioOutput: open error'

Scheduled Pinned Locked Moved Unsolved QML and Qt Quick
2 Posts 2 Posters 297 Views
  • 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.
  • I Offline
    I Offline
    isdsi
    wrote on last edited by
    #1

    It is running on desktop win32. It has no earphone or speaker.
    The qml SoundEffect type can play() and occur 'QAudioOutput: open error'.
    and if it continues to run the function call, it will say 'memory out'

    Is there any way to check 'SoundEffect' can play ??
    I had already checked if 'SoundEffect.status' is 'SoundEffect.Ready'.
    I knew about the qml Audio Type. but I want to know about 'SoundEffect'.

    function soundEffectPolicePlay(value) {
        if (value && testSoundOff === false) {
            if (soundEffectPolice.status == SoundEffect.Ready) {
                if (soundEffectPolice.isPlaying === false) {
                    soundEffectPolice.play()
                }
            }
        } else {
            if (soundEffectPolice.isPlaying) {
                soundEffectPolice.stop()
            }
        }
    }
    
    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi and welcome to devnet,

      You could check whether the default output device device is valid and if not mute your application.

      Hope it helps

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      1

      • Login

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