|View Issue Details|
|ID||Project||Category||View Status||Date Submitted||Last Update|
|0005318||Spring engine||public||2016-07-27 10:58||2017-02-06 12:21|
|Target Version||Fixed in Version||103.0 +git|
|Summary||0005318: Music plays too fast|
|Description||Sometimes the music in ZK plays too fast. This occurs rarely and only for one track. The music has a noticeably higher pitch and there is a bit of dead time at the end of the track, indicating that the track is completed sooner than expected.|
I managed to capture an example of this occurring. I did not have time to set up my recording settings so the quality of the recording is horrible. However, it is enough to determine that the music is played ~8% too fast. 'ingameTrack' is the track as it was ingame (minus the horrible recording). 'sourceTrack' is the same section of the track taken from the source file. There are two combined tracks, one with a speed modification and one without.
The music tracks are loaded with dopplerscale = 0, pitchmod = 0 and gainmod = 0. This can be seen here: https://github.com/ZeroK-RTS/Zero-K/blob/master/gamedata/sounds.lua#L88
At the time the in3d setting failed to be applied.
The music is played with sound streams in this widget: https://github.com/ZeroK-RTS/Zero-K/blob/master/LuaUI/Widgets/snd_music.lua
The bug has been present for years, but it is rare.
|Tags||No tags attached.|
|Checked infolog.txt for lua Errors|
Last edited: 2016-07-31 12:40
your sounds.lua configs are missing gain=1 & pitch=1, maybe it would fix it
If so something is wrong with the engine when switching between sounds. And values aren't correctly reset to defaults.
Also you have no `default` sound config, and so it is causing this issue in the first place.
see here: https://github.com/ZeroK-RTS/Zero-K/blob/master/gamedata/sounds.lua#L4
|I've made those changes. We'll see if it works.|
It happened again. Apparently gain = 1 and pitch = 1 did not help. Also, I was zoomed out and not moving my camera at all so that removes my doppler theory. It was the same music track as last time so perhaps it is something to do with that particular track.
Another possibility. If the game freezes slightly and then cathches up could it cause faster sound?
Occurred in 103.0.1-573-g3cdfeb7, this time for 'The Revolution'.
There was a typo where gain=1 was not being set in sounds.lua. However, I am not convinced that sounds.lua is even important. I can remove the music tracks from sounds.lua and the music still plays. The music is played with Spring.PlaySoundStream.
Last edited: 2017-02-06 12:02
this is either an openal or an ogg/vorbis bug.
ogg streams are not played with any special parameters, and the pcm sample rate is extracted from ov_info. possibly the lib needs an update or some state from a previously played file is leaking through.
|no longer possible after 1b3ede2179|
|2016-07-27 10:58||Google_Frog||New Issue|
|2016-07-27 10:58||Google_Frog||File Added: ingameTrack.ogg|
|2016-07-27 10:58||Google_Frog||File Added: sourceTrack.ogg|
|2016-07-27 10:58||Google_Frog||File Added: combinedTracks.ogg|
|2016-07-27 10:59||Google_Frog||File Added: combinedTracksIngameEightPercentSlower.ogg|
|2016-07-31 12:34||jK||Note Added: 0016586|
|2016-07-31 12:39||jK||Note Edited: 0016586||View Revisions|
|2016-07-31 12:40||jK||Note Edited: 0016586||View Revisions|
|2016-07-31 14:53||Google_Frog||Note Added: 0016587|
|2016-10-29 15:46||Google_Frog||Note Added: 0016830|
|2017-02-06 06:25||Google_Frog||Note Added: 0017222|
|2017-02-06 12:00||Kloot||Note Added: 0017225|
|2017-02-06 12:02||Kloot||Note Edited: 0017225||View Revisions|
|2017-02-06 12:21||Kloot||Assigned To||=> Kloot|
|2017-02-06 12:21||Kloot||Status||new => resolved|
|2017-02-06 12:21||Kloot||Resolution||open => fixed|
|2017-02-06 12:21||Kloot||Fixed in Version||=> 103.0 +git|
|2017-02-06 12:21||Kloot||Note Added: 0017226|