[Interest] QML Audio loops
Marc Van Daele
marc.van.daele90 at gmail.com
Thu Apr 18 14:45:31 CEST 2019
Hello,
I have the following QML that plays an audio file in an infinite loop.
import QtQuick 2.11
import QtQuick.Window 2.11
import QtMultimedia 5.8
Window {
visible: true
width: 640
height: 480
title: qsTr("Hello World")
Audio {
id: noiseId
loops: Audio.Infinite
source: "qrc:/448213__florianreichelt__white-noise.wav"
onStatusChanged: console.log("status = " + status)
onError: console.log("error = " + error + " " + errorString)
onPlaybackStateChanged: console.log("playbackstate = " + playbackState)
}
Component.onCompleted: noiseId.play()
}
I used the noise file from here
<https://freesound.org/people/florianreichelt/sounds/448213/>
Unfortunately, after every loop, I hear a clear short hiccup.
Any advice on how to avoid these hiccups?
I'm using Qt5.11.2 on Ubuntu 16.04
Thanks in advance,
Marc
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20190418/d8dd33ee/attachment.html>
More information about the Interest
mailing list