View Issue Details
|ID||Project||Category||View Status||Date Submitted||Last Update|
|0004540||The Dark Mod||Sound System||public||12.06.2017 07:25||17.01.2019 13:26|
|Target Version||TDM 2.06||Fixed in Version||TDM 2.06|
|Summary||0004540: Sound stops playing in cinematics because of breakpoints|
|Description||FFmpeg-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 Reproduce||1. 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.
|Tags||No tags attached.|
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 =(
|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.|
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 =)
BTW, the problem with stopping sound was not fixed.
Moved it into separate issue (see related).
|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|