Wine Battlefield 1942 Sound

Open forum for end-user questions about Wine. Before asking questions, check out the Wiki as a first step.
Forum Rules
Locked
duke11235
Level 1
Level 1
Posts: 8
Joined: Tue Aug 18, 2009 4:07 pm

Wine Battlefield 1942 Sound

Post by duke11235 »

Can someone explain Jeff's hack, I really want to play BF1942 with sound fixed,especially with kdog's comment 15. Thanks

http://bugs.winehq.org/show_bug.cgi?id=11499#c15

Thank You, so far both Fedora and Ubuntu forums are mute
vitamin
Moderator
Moderator
Posts: 6605
Joined: Sat Feb 23, 2008 2:29 pm

Re: Wine Battlefield 1942 Sound

Post by vitamin »

duke11235 wrote:Can someone explain Jeff's hack, I really want to play BF1942 with sound fixed,especially with kdog's comment 15.
Most likely this (watchout for wrapped lines):

Code: Select all

diff --git a/dlls/dsound/sound3d.c b/dlls/dsound/sound3d.c
index 252c763..afef379 100644
--- a/dlls/dsound/sound3d.c
+++ b/dlls/dsound/sound3d.c
@@ -210,7 +210,7 @@ void DSOUND_Calc3DBuffer(IDirectSoundBufferImpl *dsb)
                flDistance = dsb->ds3db_ds3db.flMinDistance;

        /* attenuation proportional to the distance squared, converted to millibels as in lVolume*/
-       lVolume -= log10(flDistance/dsb->ds3db_ds3db.flMinDistance * flDistance/dsb->ds3db_ds3db.flMinDistance)*1000;
+       lVolume += 1000 * log10(1.0/flDistance);
        TRACE("dist. att: Distance = %f, MinDistance = %f => adjusting volume %d to %f\n", flDistance, dsb->ds3db_ds3db.flMinDistance, dsb->ds3db_lVolume, lVolume);

        /* conning */
duke11235
Level 1
Level 1
Posts: 8
Joined: Tue Aug 18, 2009 4:07 pm

Response

Post by duke11235 »

So, what? Is it a standard copy and paste in to the terminal idea? IF it's a command, do I need to undo it for certan things? Which file do I need to edit and add or replace code with this. Thanks for all help. You have been my only help so far, both ubuntu and fedora forums are still unresponsive
vitamin
Moderator
Moderator
Posts: 6605
Joined: Sat Feb 23, 2008 2:29 pm

Re: Response

Post by vitamin »

duke11235 wrote:So, what?
http://wiki.winehq.org/Patching
If that doesn't make sense to you, then you should wait until this is fixed upstream (in Wine itself).
duke11235
Level 1
Level 1
Posts: 8
Joined: Tue Aug 18, 2009 4:07 pm

Thank You

Post by duke11235 »

So all I have to do is save that file as .diff and follow the instructions. How long do you think before it is patched upstream?
vitamin
Moderator
Moderator
Posts: 6605
Joined: Sat Feb 23, 2008 2:29 pm

Re: Thank You

Post by vitamin »

duke11235 wrote:So all I have to do is save that file as .diff and follow the instructions.
Pretty much, or do that one line change manually.
duke11235 wrote:How long do you think before it is patched upstream?
No idea, that patch rather looks like a hack. And hacks are not accepted into Wine.
duke11235
Level 1
Level 1
Posts: 8
Joined: Tue Aug 18, 2009 4:07 pm

Post by duke11235 »

For the wine source folder, it just oges in, not in any of the sub-directories
~/wine-git/
Pilot_51
Newbie
Newbie
Posts: 1
Joined: Fri Jul 09, 2010 12:27 am

Post by Pilot_51 »

Here's a vote for getting this fixed upstream. Bug still exists in 1.2-rc6 and have been dealing with it since I started using Ubuntu around 3 years ago. BF1942 is my favorite game of all time, so having it working perfectly is high on my wish list for Wine.
Locked