Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cinematic audio playback speed is too fast / out of sync with video #109

Open
joshbtdev opened this issue Dec 20, 2019 · 17 comments
Open

Cinematic audio playback speed is too fast / out of sync with video #109

joshbtdev opened this issue Dec 20, 2019 · 17 comments

Comments

@joshbtdev
Copy link

joshbtdev commented Dec 20, 2019

Can be reproduced by watching the intro cinematic. File attached below:

intro.zip

@turican0
Copy link
Owner

I can not report both errors. On my PC program run fine(sound and loading is correctly). May be you use other version of original game. Can send to me zipped folder "original-game" and file debug.txt to my email:
turican0@gmail.com
I add some debug infos to version 0.92, but this version not any fixes.
Thanks.

@joshbtdev
Copy link
Author

I have emailed the game folder. GOG version 2.1.0.7

I am getting an error with version 0.92 however.

Capture3

@turican0
Copy link
Owner

turican0 commented Dec 27, 2019

I find same problem on my second computer. I uploaded version with more dll libraries(this version runs correctly).

Thank you.

@turican0
Copy link
Owner

I test game with your data files(GOG version 2.1.0.7) and runs without any problems(speed sound in intro is ok, loading is ok).

You can test actual version with new dll libraryes.

You can test, setting hqsound = false, in ini file, too.

I analyze your debug.txt, and fix some garbage in loading:

myopen:open file:C:/netherw/cdata/tmaps2-0.dat
myopen:open file:fixed:C:/netherw/cdata/tmaps2-0.dat
myopen:open end 0502E580
file_exists:false - this is problem with loading

And I add more debug info to this place in code.

@joshbtdev
Copy link
Author

Still getting crash on load and fast audio even with the sound setting changed to False.

crash.zip

debug.txt

@turican0
Copy link
Owner

I identify problem with craching loading game. HQ graphics not included in binary version, but path on my computers sets to existing instance of this.
I uploaded new version 0.93, with fix of this.
Problem with speed sound I not recognize. I update SDL2 and SDL-mixer-X, may be fix this problem. I too add some debug info.
Please test new version and write result/send debug.txt.
When exist again, I my be rewrite sound from SDL-mixer to OPENAL.

@joshbtdev
Copy link
Author

joshbtdev commented Dec 30, 2019

The new version fixes the level load issue. Was able to load the first level successfully. It appears that the "fast" sound issue effects all game sounds, not just the cinematics and still occurs in version 0.93.

When entering fullscreen, the image is not scaling / stretching to fill the whole screen. It is only displaying as a smaller square in the center of the screen.

Will do some more gameplay testing and report any other bugs found :)

Most recent debug info:
debug.txt

@turican0
Copy link
Owner

turican0 commented Jan 1, 2020

Thank you, problem with sound is in code of game (not SDL2 or SDL-mixer-X),
begin of your sample is: 0E263040
and true of begin of sample is: 0CB4B040
I analyze this problem and find it or add next debug info.

Second problem is problem with resolution. Fullscreen mode is in 640x480px, when this resolution not native on your graphics card, show game in small rectangle. I add some code for find some native resolution.
(Game have hardcode resolutions 320x200 and 640x480, use different resolutions is hard(I not rewrite this code at this time), but I can stretch to different resolutions)

@turican0
Copy link
Owner

turican0 commented Jan 1, 2020

I add to release 0.93 (https://github.com/turican0/remc2/releases/edit/0.93) updated remc2.exe.
Please test it and add debug.txt from this version.
-game start in fullscreen, stretch not fixed now(I update it later)
-added debug next info for analyze problems with sound

@joshbtdev
Copy link
Author

I tested with the new EXE file, and fullscreen is stretching properly to whole screen now.

Here is the debug for sound:
debug.txt

@turican0
Copy link
Owner

turican0 commented Jan 2, 2020

Please test new remc2.exe from https://github.com/turican0/remc2/releases/tag/0.93.
I change count of sound channels, may be this fix sound.

@joshbtdev
Copy link
Author

Still the same result. Audio is playing fast still. Debug attached below:

debug.txt

@joshbtdev
Copy link
Author

joshbtdev commented Jan 2, 2020

UPDATE: I just tested the application after changing the default sound source and the audio issue did not occur. So, seems like a hardware compatibility issue:

Fast audio occurs when using Sound BlasterX AE-5, but does not occur when using NVIDIA HDMI Audio.

I will test more with the Sound Blaster settings.

EDIT: Turning on "Direct Mode" in Sound Blaster audio settings fixes the audio playback speed. Not sure why the audio plays fast using default settings for the Sound Blaster.

EDIT 2: I have gone back to using the previous REMC2.EXE because the scaling with the updated file makes the game run very slow (even when changing the game speed in config.ini)

@turican0
Copy link
Owner

turican0 commented Jan 3, 2020

1)In next week I test integration OPENAL - this is maybe better sound library than SDL2/SDL-MIXER, but more complex.
2)I find faster method to scaling(now I use software scaling). For high resolutions maybe this methods is slow.

@joshbtdev
Copy link
Author

joshbtdev commented Jan 3, 2020

The game is already very playable. I've only encountered a few bugs with some sound effects dropping out. Amazing progress.

Usually the doxbox emulated version would crash very often.

The previous EXE version for scaling works well.

@turican0
Copy link
Owner

turican0 commented Jan 3, 2020

I update new exe with hardware scaling.
Your version of exe work correctly only on 4:3 resolution.
Never version have on other screen ratio black strips.

@turican0
Copy link
Owner

turican0 commented Jan 7, 2020

I upload remc2.exe and config.ini, with some sound fixes, when sound still speed, you can set fixspeedsound in config to true.

turican0 pushed a commit that referenced this issue Jul 22, 2022
fix regression tests and x64 in old render
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants