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. Audio Component Failure

Audio Component Failure

Scheduled Pinned Locked Moved Unsolved QML and Qt Quick
3 Posts 2 Posters 530 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.
  • D Offline
    D Offline
    Delavega77
    wrote on last edited by
    #1

    Hi all, i'm trying to add background music to a small application but i get this error:
    I'm using Win7 and mingw
    ASSERT: "!url.isRelative() && (QQmlFile::urlToLocalFileOrQrc(url).isEmpty() || !QDir::isRelativePath(QQmlFile::urlToLocalFileOrQrc(url)))" in file qml\qqmltypeloader.cpp, line 1639
    Invalid parameter passed to C runtime function.
    Invalid parameter passed to C runtime function.

    this is the code:

    Audio{
    id: musicBkg
    source: "file:///Users/COMPUTER/Documents/candycrush/candy-crush-like-master/sound/bkg1.wav"
    autoLoad: true
    autoPlay: false
    volume: 1.0
    loops: Audio.Infinite
    }

    I tried to add to qrc but i got the same error as well.

    What am i missing? thank you all

    1 Reply Last reply
    0
    • ODБOïO Offline
      ODБOïO Offline
      ODБOï
      wrote on last edited by
      #2

      @Delavega77 hi
      disk name is missing in the path
      "file:///c:/Users/...

      D 1 Reply Last reply
      0
      • ODБOïO ODБOï

        @Delavega77 hi
        disk name is missing in the path
        "file:///c:/Users/...

        D Offline
        D Offline
        Delavega77
        wrote on last edited by
        #3

        @LeLev
        thank your for the reply.
        I already tried with "file:///c:/Users/... but i got always the same error

        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