http://bugs.winehq.org/show_bug.cgi?id=30811
Bug #: 30811 Summary: Music in Alpha Centauri stutters Product: Wine Version: unspecified Platform: x86 OS/Version: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: -unknown AssignedTo: wine-bugs@winehq.org ReportedBy: michael@mcdonnell.dk Classification: Unclassified
Created attachment 40348 --> http://bugs.winehq.org/attachment.cgi?id=40348 Trace with WINEDEBUG=3D+driver,+winmm,+mmio,+mmsys,+sound,+mmtime,+mciwave,+msacm,+wavemap,+wave,+midi,+mixer,+mmaux,+dscapture,+dsound,+dsound3d
The background music in Alpha Centauri stutters. The music is generated on the fly through a tracker like system that uses midi and wave files (see .amb files in the fx directory). It is odd that the music is only affected and not sound effects in general.
The attached trace shows several mmio warnings about the buffers being too large. I suspect that it might cause sound stuttering if the buffers are not big enough to hold all the sound data.
http://bugs.winehq.org/show_bug.cgi?id=30811
Michael Mc Donnell michael@mcdonnell.dk changed:
What |Removed |Added ---------------------------------------------------------------------------- URL| |http://www.firaxis.com/down | |loads/Demo/smac_demo1_1.exe
--- Comment #1 from Michael Mc Donnell michael@mcdonnell.dk 2012-05-31 10:00:04 CDT --- I have added a download link to the demo.
http://bugs.winehq.org/show_bug.cgi?id=30811
Pierre Etchemaite pe-winehq@concept-micro.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |pe-winehq@concept-micro.com
http://bugs.winehq.org/show_bug.cgi?id=30811
joaopa jeremielapuree@yahoo.fr changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |jeremielapuree@yahoo.fr
--- Comment #2 from joaopa jeremielapuree@yahoo.fr 2012-06-01 03:22:51 CDT --- I confirm this bug.
http://bugs.winehq.org/show_bug.cgi?id=30811
Austin English austinenglish@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Keywords| |download Status|UNCONFIRMED |NEW Ever Confirmed|0 |1
--- Comment #3 from Austin English austinenglish@gmail.com 2012-06-01 11:31:57 CDT --- Confirming.
http://bugs.winehq.org/show_bug.cgi?id=30811
Kenny karmstrong@gmx.us changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |karmstrong@gmx.us
--- Comment #4 from Kenny karmstrong@gmx.us 2012-06-26 20:53:40 CDT --- I also confirm that I am having this problem.
http://bugs.winehq.org/show_bug.cgi?id=30811
Perttu Luukko perttu.luukko@iki.fi changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |perttu.luukko@iki.fi
http://bugs.winehq.org/show_bug.cgi?id=30811
Paul The Tall paulthetall@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |paulthetall@gmail.com
--- Comment #5 from Paul The Tall paulthetall@gmail.com 2012-11-04 16:06:43 CST --- Same thing still in 1.5.16. Can you guys please take a look or having work arounds? Many thanks!
http://bugs.winehq.org/show_bug.cgi?id=30811
Paul The Tall paulthetall@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |austinenglish@gmail.com
http://bugs.winehq.org/show_bug.cgi?id=30811
Austin English austinenglish@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC|austinenglish@gmail.com |
http://bugs.winehq.org/show_bug.cgi?id=30811
Ernest Skrzypczyk erni.berni@vp.pl changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |erni.berni@vp.pl
--- Comment #6 from Ernest Skrzypczyk erni.berni@vp.pl 2012-12-01 18:56:48 CST --- The following scripts are for fixing the symptoms, not the problems source, which lies somewhere within games and/or wine sound engine. Use these scripts from games directory. The first one is necessary, the second one not really. Both use Sound Exchange. Original audio files are not overwritten, but modified copies are made and then linked as primordial directory. Dithering is also added with no resampling. These scripts could be used with PlayOnLinux. ---- DIR0=fx;DIR1="$DIR0.org";DIR2="$DIR0.mod"; if [ ! -d "$DIR1" ]; then mv -v "$DIR0" "$DIR1"; fi; if [ ! -d "$DIR2" ]; then mkdir "$DIR2"; else rm -v "$DIR2"/*; fi; for FILES in $DIR1/*.wav; do FILE="`echo $FILES|rev|cut -d '/' -f 1|rev`"; sox "$DIR1/$FILE" --norm=-1 "$DIR2/$FILE" pad 0.1 2.4 rate -v 22050 dither; done; cp -nv "$DIR1"/* "$DIR2"; if [ ! -L "$DIR0" ]; then ln -sv "$DIR2" "$DIR0"; fi; ---- DIR0=voices;DIR1="$DIR0.org";DIR2="$DIR0.mod"; if [ ! -d "$DIR1" ]; then mv -v "$DIR0" "$DIR1"; fi; if [ ! -d "$DIR2" ]; then mkdir "$DIR2"; else rm -v "$DIR2"/*; fi; for FILES in $DIR1/*.mp3; do FILE="`echo $FILES|rev|cut -d '/' -f 1|rev`"; sox "$DIR1/$FILE" --norm=-1 "$DIR2/$FILE" pad 0.1 2.4 rate -v 22050 dither; done; cp -nv "$DIR1"/* "$DIR2"; if [ ! -L "$DIR0" ]; then ln -sv "$DIR2" "$DIR0"; fi; ---- It seems the sound buffer doesn't quit the right way on "cpu review your options.wav". I did not find any significant offset in the audio, so maybe some other factors play a role here. However looping occurs on the last seconds of sound file, that probably stays in buffer forever, since it doesn't quit right. Therefore using soxs pad function (extending original audio file) fixes the problem. Clicks and stuttering seem to be related to sound file amplitudes, so reducing gain (sox INFILE OUTFILE gain -3) or normalizing audio to lower level like in the scripts fixes that problem. Resulting sounds in the game play more nicely with no stuttering, clicking and looping. They are a bit delayed, however this seems to be a problem of game engine. If problems with long sound files occur, one could loop them (sox INFILE INFILE INFILE OUTFILE).
Wine-1.5.12-157-gbdf9a9f from repository OpenSUSE 12.1 x86_64 AMD FX Bulldozer 8150 Asus M5A99X EVO G.Skill 16 GB DDR3-14900 AMD/ATI Radeon HD 4850 with Fglrx 12.4
http://bugs.winehq.org/show_bug.cgi?id=30811
--- Comment #7 from Paul The Tall paulthetall@gmail.com 2012-12-02 00:40:22 CST --- (In reply to comment #5)
Same thing still in 1.5.16. Can you guys please take a look or having work arounds? Many thanks!
Thanks so much for the reply, how to implant this workaround in the game practicly?
http://bugs.winehq.org/show_bug.cgi?id=30811
--- Comment #8 from Ernest Skrzypczyk erni.berni@vp.pl 2012-12-02 01:30:30 CST --- (In reply to comment #7)
(In reply to comment #5)
Same thing still in 1.5.16. Can you guys please take a look or having work arounds? Many thanks!
Thanks so much for the reply, how to implant this workaround in the game practicly?
I assume you wanted to reply to my comment. The texts between '----' are the scripts. Change directory to your Alpha Centuri game folder. Copy and paste the first script and press enter. You need Sound Exchange to run this, search for sox in your repository and/or your package manager. Second script is only for better quality (dithering), depending on your sound system, ears and placebo.
http://bugs.winehq.org/show_bug.cgi?id=30811
Cory cory.gugler@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |cory.gugler@gmail.com
--- Comment #9 from Cory cory.gugler@gmail.com --- (In reply to comment #6)
The following scripts are for fixing the symptoms, not the problems source, which lies somewhere within games and/or wine sound engine. Use these scripts from games directory. The first one is necessary, the second one not really. Both use Sound Exchange. Original audio files are not overwritten, but modified copies are made and then linked as primordial directory. Dithering is also added with no resampling. These scripts could be used with PlayOnLinux.
DIR0=fx;DIR1="$DIR0.org";DIR2="$DIR0.mod"; if [ ! -d "$DIR1" ]; then mv -v "$DIR0" "$DIR1"; fi; if [ ! -d "$DIR2" ]; then mkdir "$DIR2"; else rm -v "$DIR2"/*; fi; for FILES in $DIR1/*.wav; do FILE="`echo $FILES|rev|cut -d '/' -f 1|rev`"; sox "$DIR1/$FILE" --norm=-1 "$DIR2/$FILE" pad 0.1 2.4 rate -v 22050 dither; done; cp -nv "$DIR1"/* "$DIR2"; if [ ! -L "$DIR0" ]; then ln -sv "$DIR2" "$DIR0"; fi;
DIR0=voices;DIR1="$DIR0.org";DIR2="$DIR0.mod"; if [ ! -d "$DIR1" ]; then mv -v "$DIR0" "$DIR1"; fi; if [ ! -d "$DIR2" ]; then mkdir "$DIR2"; else rm -v "$DIR2"/*; fi; for FILES in $DIR1/*.mp3; do FILE="`echo $FILES|rev|cut -d '/' -f 1|rev`"; sox "$DIR1/$FILE" --norm=-1 "$DIR2/$FILE" pad 0.1 2.4 rate -v 22050 dither; done; cp -nv "$DIR1"/* "$DIR2"; if [ ! -L "$DIR0" ]; then ln -sv "$DIR2" "$DIR0"; fi;
It seems the sound buffer doesn't quit the right way on "cpu review your
options.wav". I did not find any significant offset in the audio, so maybe some other factors play a role here. However looping occurs on the last seconds of sound file, that probably stays in buffer forever, since it doesn't quit right. Therefore using soxs pad function (extending original audio file) fixes the problem. Clicks and stuttering seem to be related to sound file amplitudes, so reducing gain (sox INFILE OUTFILE gain -3) or normalizing audio to lower level like in the scripts fixes that problem. Resulting sounds in the game play more nicely with no stuttering, clicking and looping. They are a bit delayed, however this seems to be a problem of game engine. If problems with long sound files occur, one could loop them (sox INFILE INFILE INFILE OUTFILE).
Wine-1.5.12-157-gbdf9a9f from repository OpenSUSE 12.1 x86_64 AMD FX Bulldozer 8150 Asus M5A99X EVO G.Skill 16 GB DDR3-14900 AMD/ATI Radeon HD 4850 with Fglrx 12.4
Worked great for me. For anyone trying this now you may need to change: --norm=-1 to --norm in the scripts above.
https://bugs.winehq.org/show_bug.cgi?id=30811
Ken Sharp imwellcushtymelike@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Keywords| |Abandoned? Version|unspecified |1.5.12
--- Comment #10 from Ken Sharp imwellcushtymelike@gmail.com --- Is this still an issue in Wine 1.7.44 or later?
https://bugs.winehq.org/show_bug.cgi?id=30811
--- Comment #11 from Michael Mc Donnell michael@mcdonnell.dk --- The music does not stutter in wine 1.7.38 installed from the ubuntu PPA (I did not compile from source). I am fine with closing it unless someone objects.
There are still quite few loud clicking sounds but I think that is a separate issue. The clicking is present when the music is disabled. The clicking comes right before a sound is played. If you open the preferences and hover over the options, then you get a click before the hover sound is played. Again, that is a different issue though.
https://bugs.winehq.org/show_bug.cgi?id=30811
super_man@post.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |austinenglish@gmail.com, | |super_man@post.com
--- Comment #12 from super_man@post.com --- (In reply to Michael Mc Donnell from comment #11)
The music does not stutter in wine 1.7.38 installed from the ubuntu PPA (I did not compile from source). I am fine with closing it unless someone objects.
There are still quite few loud clicking sounds but I think that is a separate issue. The clicking is present when the music is disabled. The clicking comes right before a sound is played. If you open the preferences and hover over the options, then you get a click before the hover sound is played. Again, that is a different issue though.
Reported fixed once.
https://bugs.winehq.org/show_bug.cgi?id=30811
Austin English austinenglish@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution|--- |FIXED
--- Comment #13 from Austin English austinenglish@gmail.com --- (In reply to Michael Mc Donnell from comment #11)
The music does not stutter in wine 1.7.38 installed from the ubuntu PPA (I did not compile from source). I am fine with closing it unless someone objects.
Fixed.
There are still quite few loud clicking sounds but I think that is a separate issue. The clicking is present when the music is disabled. The clicking comes right before a sound is played. If you open the preferences and hover over the options, then you get a click before the hover sound is played. Again, that is a different issue though.
Please file a new bug if that's still the case in 1.8.r
https://bugs.winehq.org/show_bug.cgi?id=30811
Alexandre Julliard julliard@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #14 from Alexandre Julliard julliard@winehq.org --- Closing bugs fixed in 1.9.0.