Ask a noob question, how is the url written?
-
import QtQuick 2.15 import QtQuick.Window 2.15 import QtQuick.Controls import QtMultimedia ApplicationWindow{ id:window visible: true MediaPlayer { id: player source: "file:///C:/Users/user/Downloads/1.01 HARVESTELLA Main Theme.flac" audioOutput: AudioOutput {} } Component.onCompleted: { player.play() } }
This format is the answer after I have searched, but he does not work. I also tried "\" instead of "/" and "file://" instead of "file:///".
-
Try \ instead of /.
/ is for Linux and Unix. Although QML should be able to handle it.
"file:///C:\Users\user\Downloads\1.01 HARVESTELLA Main Theme.flac"
I guess Windows did this on purpose and was not nice. -
wav file can be played back in Windows Media Player if the appropriate codecs are installed on the computer. The most common audio codecs that are used in . wav files include Microsoft Adaptive Differential Pulse Code Modulation (MS ADPCM) and uncompressed Pulse Code Modulation (PCM).