openmoh / openmohaa

Open re-implementation of Medal of Honor: Allied Assault with modern features and bugfixes from ioquake3 with cross-platform support
https://www.openmohaa.org
GNU General Public License v2.0
328 stars 23 forks source link

(MoHAA/Spearhead/Breakthrough) OpenMoHAA starts too slow when I build it with the parameter -DUSE_SOUND_NEW=1 #333

Closed gbudny closed 2 months ago

gbudny commented 3 months ago

Hi

I want to inform you that OpenMoHAA starts too slow when I build it with the parameter -DUSE_SOUND_NEW=1. I see the black screen for 3-5 seconds, and then I see a main menu.

I uploaded all new files:

https://we.tl/t-KHOvqvei2S

Can you fix it?

smallmodel commented 3 months ago

Unfortunately this won't be fixable right now, openmohaa doesn't support streamed sounds. All sounds are loaded synchronously on memory. Original MOHAA loads streamed sounds like MP3 sounds asynchronously, it prevents hiccups like on openmohaa. Compiling in release mode (optimized code) should reduce the delay

gbudny commented 3 months ago

Hi

Thank you for the answer.

I noticed a few other similar problems, but this issue isn't a place to discuss all of them separately. I will create separate issues for all of them soon. Maybe it won't be necessary, and you will find a solution.

I will try to build it in Release mode, but I'm not sure if it will help me.

The new sound system slows down OpenMoHAA on modern computers. It solves some problems, but it has very high requirements. It reminded me of Doom 3 on the old PC with Pentium 4/RAM: 2GB/GeForce FX to give you a better example. The game often stops for 1-2 seconds, or I can't move.

Do you think it's possible to make the new sound system work faster on modern PC computers (and probably the other platforms)?

gbudny commented 3 months ago

Hi

Thank you.

I built it in Release mode, and now the game starts in 1-2 seconds, which is a nice improvement. However, it doesn't solve this issue in Debug mode.

Unfortunately, OpenMoHAA has similar performance issues to those in a debug version.

smallmodel commented 3 months ago

Try to test the experimental streaming feature by using this branch: features/oal-streaming

It works for me, but it will need more testing, need to check for crashes and errors.

gbudny commented 3 months ago

Try to test the experimental streaming feature by using this branch: features/oal-streaming

It works for me, but it will need more testing, need to check for crashes and errors.

Hi

Thank you.

I will check this version and start to report bugs when I find them.

gbudny commented 2 months ago

Thank you.

It works now.