Play QMediaPlaylist items without delay
-
I need playing a sequence of QMediaPlaylist items sequentially. Items are wav (PCM) files on local drive. But QMediaPlayer plays them with delay (about one second long) between them (and with distinctive sound on Linux with pulseaudio and when playing of the first item starts). Can I overcome this delay and sound?
Example of code:
QMediaPlaylist playlist; playlist.addMedia(QUrl::fromLocalFile("file1")); playlist.addMedia(QUrl::fromLocalFile("file2")); playlist.setCurrentIndex(0); QMediaPlayer player; player.setPlaylist(&playlist) playlist.setPlaybackMode(QMediaPlaylist::Sequential); player.play();
-
Hi! Have you tried
QMediaPlayer::LowLatency
? -
@Wieland said in Play QMediaPlaylist items without delay:
Hi! Have you tried
QMediaPlayer::LowLatency
?It didn't help.
-
I watched playback streams in pavucontrol (pulseaudio mixer). Qt creates new stream for each playlist item. Can I make pulseaudio use one stream for all items or create streams beforehead as QSoundEffect?