2019-12-14 22:44 CET

View Issue Details Jump to Notes ]
IDProjectCategoryView StatusLast Update
0005318Spring enginepublic2017-02-06 12:21
ReporterGoogle_Frog 
Assigned ToKloot 
PrioritynormalSeverityminorReproducibilitysometimes
StatusresolvedResolutionfixed 
Product Version103.0 
Target VersionFixed in Version103.0 +git 
Summary0005318: Music plays too fast
DescriptionSometimes 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.
TagsNo tags attached.
Checked infolog.txt for Errors
Attached Files

-Relationships
+Relationships

-Notes

~0016586

jK (developer)

Last edited: 2016-07-31 12:40

View 3 revisions

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

~0016587

Google_Frog (reporter)

I've made those changes. We'll see if it works.

~0016830

Google_Frog (reporter)

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?

~0017222

Google_Frog (reporter)

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.

~0017225

Kloot (developer)

Last edited: 2017-02-06 12:02

View 2 revisions

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.

~0017226

Kloot (developer)

no longer possible after 1b3ede2179
+Notes

-Issue History
Date Modified Username Field Change
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
+Issue History