View Issue Details

IDProjectCategoryView StatusLast Update
0004540The Dark ModSound Systempublic17.01.2019 13:26
Reporterstgatilov Assigned Tostgatilov  
Status resolvedResolutionfixed 
Product VersionSVN 
Target VersionTDM 2.06Fixed in VersionTDM 2.06 
Summary0004540: Sound stops playing in cinematics because of breakpoints
DescriptionFFmpeg-based cinematics can play video with sound.
I have noticed that sometimes sound stops playing completely if I use breakpoints in the code.
Steps To Reproduce1. Install cinematics with sound (as explained in the related issue).
2. Start playing cinematics.
3. Put breakpoint in idCinematicFFMpeg::SoundForTimeInterval.
4. Hit F5 (continue) in MSVC several times (perhaps with different timing).
Sound should continue playing, but it stops completely.

Note that you should not wait for too long (e.g. minutes) in breakpoint, because after you resume, the cinematic would fast-forward all the time it skipped during breakpoint.
TagsNo tags attached.


related to 0004534 resolvedstgatilov Playing sound stream from video file 
related to 0004553 resolvedstgatilov Some gameplay sounds stop playing after noclipping 
related to 0004949 resolvedstgatilov Briefing Sound Looped / Out of Sync 




12.06.2017 07:29

administrator   ~0008899

If I set breakpoint in idCinematicFFMpeg::ImageForTime, the issue does not happen.

I have traced the problem to method idSoundWorldLocal::AddChannelContribution, where finishedbuffers becomes zero no matter what, as the result sound is not queried from cinematics. Normally, finishedbuffers must be equal to the number of OpenAL buffers already played successfully and available for being reused (three OpenAL buffers are used in total).
I suspect that this OpenAL implementation is not very reliable. Not to mention that there are almost not OpenAL error checks here =(


12.06.2017 07:31

administrator   ~0008900

As a minor comment: when I flied through the training mission with noclip on my old PC, sometimes almost all the sound stopped playing. It may be related to this or not -- to be investigated.


03.07.2017 02:00

administrator   ~0008954

Fixed in revision 6997.
The OpenAL implementation is really not very good. It relies on the fact that some information won't change during the time interval when sound data is fetched and updated.
I made a small change which should fix the problem. I think it might be good to rewrite it from scratch, but I don't want to test it afterwards =)


03.07.2017 02:06

administrator   ~0008956

BTW, the problem with stopping sound was not fixed.
Moved it into separate issue (see related).

Issue History

Date Modified Username Field Change
12.06.2017 07:25 stgatilov New Issue
12.06.2017 07:25 stgatilov Status new => assigned
12.06.2017 07:25 stgatilov Assigned To => stgatilov
12.06.2017 07:25 stgatilov Relationship added related to 0004534
12.06.2017 07:29 stgatilov Note Added: 0008899
12.06.2017 07:31 stgatilov Note Added: 0008900
03.07.2017 02:00 stgatilov Note Added: 0008954
03.07.2017 02:05 stgatilov Relationship added related to 0004553
03.07.2017 02:06 stgatilov Note Added: 0008956
03.07.2017 02:07 stgatilov Status assigned => resolved
03.07.2017 02:07 stgatilov Fixed in Version => TDM 2.06
03.07.2017 02:07 stgatilov Resolution open => fixed
03.07.2017 02:07 stgatilov Target Version => TDM 2.06
17.01.2019 13:26 stgatilov Relationship added related to 0004949