Go Back   StepMania Forums > Help and Support > General questions
Connect with Facebook

Reply
 
Thread Tools Rating: Thread Rating: 5 votes, 2.00 average. Display Modes
Old 11-06-2009, 06:35 AM   #1
howl
Member
 
Join Date: Nov 2009
Posts: 90
howl is a 2 bar user
Reputation: 10

Post rating: Votes: 0 Score: 0rate    
Default Can't find the cause of compilation error with this patch

http://pastie.org/686104

It's essentially Ondřej Hošek's patch with Damien Thébault's make and configure. The error output compiling it in top of 28221 revision (the lastest ones I didn't get to compile without the patch applied) is:

http://pastie.org/686110

I can't get the issue because all the unreferenced functions all in the <pulse/simple.h> include.

By now the only working way is Damien Thébault's, work perfect, no artifacts or anything else like alsa, but, when closing stepmania a crash is done. The problem of Damien Thébault's patch is that it doesn't follow the structure of the stepmania audio drivers, but uses the advanced asynchronous API of pulseaudio. Ondřej Hošek's one is complaint the driver structure but uses the synchronous simple API of pulseaudio, but indeed it should be enough for stepmania needs.

If someone can see where is the issue for the functions be unreferenced I could compile and test myself, no need to lose your time testing.

Thanks in advice.
howl is offline   Reply With Quote
Old 11-06-2009, 01:44 PM   #2
pcvii
Member
 
Join Date: Nov 2009
Location: Lafayette, IN, USA
Posts: 24
pcvii is a 1 bar user
Reputation: 10

Post rating: Votes: 0 Score: 0rate    
Default

is it possible to run stepmania in a debug mode or do we need to use makefiles and compile and test? :P

I would like to do what you did that got rid of the artifiacts. I mean if you could run stepmania in a debug mode then when it exits you could see what is causing the crash and possibly stop it.

I come from windows with Visual C++ Express 2008 :P I'm not sure what the best tools are for linux. I just follow directions and do the configure and make thing with the scripts.

I hope you can get this to work. One less reason to run back to windows

edit: I think I found one of the patches you were talking about. Doing a google search. http://old.nabble.com/StepMania-Puls...d24506132.html. I'm guessing since it's fairly recent it's one of them. I think I'll try to apply it later. Not sure how to yet.

edit: http://sourceforge.net/mailarchive/f...stepmania-devs I was wondering where you download it. I guess I was looking at some kinda copy of the archieve. The actual archieve has the link for downloading the file. Thought if anyone else reads this they might want to know.

Last edited by pcvii; 11-06-2009 at 10:14 PM.. Reason: Wanted to put a better link for people who might read this.
pcvii is offline   Reply With Quote
Old 11-06-2009, 05:23 PM   #3
howl
Member
 
Join Date: Nov 2009
Posts: 90
howl is a 2 bar user
Reputation: 10

Post rating: Votes: 1 Score: 0rate    
Default

Yes that is the Damien's patch, it patch with no problems lastest stepmania's revisions, but I use the 28221 revision because the newest fail to compile they selfs without any patch.

If you want to try it first make sure you have all installed all the dependencies of StepMania:

Code:
sudo apt-get install libasound2-dev libmad0-dev libtheora-dev libvorbis-dev libpng-dev libjpeg-dev libglu1-mesa-dev libgl1-mesa-dev libgtk2.0-dev xorg-dev libxrandr-dev automake1.10 build-essential subversion curl g++
Or the method of your prefered distribution.

Also install pulse-dev:
Code:
sudo apt-get install libpulse-dev
Then make a directory where download stepmania svn and save there the patch with the name_you_want.patch, from a terminal go to the directory and inside it:
Code:
svn co https://svn.stepmania.com/svn/trunk/stepmania -r 28221
When it has finish:
Code:
cd stepmania
patch -p0 -i ../name_you_want.patch
The output should be some files patched and one with fuzz 1. Now you have the source patched. So:
Code:
./autogen.sh
./Utils/build.sh
Then stepmania should compile without problems, if something fails execute:
Code:
./Utils/build.sh --verbose
to see what is failing.

to start StepMania:
Code:
./stepmania
You should notice that the sound is perfect and if you put StepMania and launch a volume manager that uses PulseAudio you should see the "Stepmania" stream, this should be changed to "StepMania" but it's a very very minor to do so xD.

When you exits the game it should report the crash.
howl is offline   Reply With Quote
Old 11-06-2009, 05:55 PM   #4
howl
Member
 
Join Date: Nov 2009
Posts: 90
howl is a 2 bar user
Reputation: 10

Post rating: Votes: 0 Score: 0rate    
Default

I forget, use the last Damien's patch version 0.2.
howl is offline   Reply With Quote
Old 11-06-2009, 10:16 PM   #5
pcvii
Member
 
Join Date: Nov 2009
Location: Lafayette, IN, USA
Posts: 24
pcvii is a 1 bar user
Reputation: 10

Post rating: Votes: 0 Score: 0rate    
Default

Thanks for the instructions. I got the patch gonna try to apply it now.
--EDIT--
It's working perfectly. And for some reason it isn't crashing on exit atleast it hasn't yet. Exited twice. I followed you're instructions line by line.

One issue I had was when I applied a change in settings my keyboard and mouse became un responsive. While the game was still going on the screen. I don't know if that's related or not. I got the settings how I want them so I don't plan on changing anything for a bit.

Last edited by pcvii; 11-07-2009 at 12:10 AM..
pcvii is offline   Reply With Quote
Old 11-07-2009, 04:16 AM   #6
howl
Member
 
Join Date: Nov 2009
Posts: 90
howl is a 2 bar user
Reputation: 10

Post rating: Votes: 0 Score: 0rate    
Default

Quote:
Originally Posted by pcvii View Post
Thanks for the instructions. I got the patch gonna try to
It's working perfectly. And for some reason it isn't crashing on exit atleast it hasn't yet. Exited twice. I followed you're instructions line by line.
Wow, ¿really?, what version of PulseAudio you have? mine is 0.9.19. The only way to notice the crash is in the output of the console because is just when closing :)

Quote:
Originally Posted by pcvii View Post
One issue I had was when I applied a change in settings my keyboard and mouse became un responsive. While the game was still going on the screen. I don't know if that's related or not. I got the settings how I want them so I don't plan on changing anything for a bit.
This issue is related to the focus of the window, I haven't found the way to refocus stepmania.
howl is offline   Reply With Quote
Old 11-07-2009, 05:27 AM   #7
AJ 187
admin
 
AJ 187's Avatar
 
Join Date: Aug 2006
Location: Chicago
Posts: 1,589
AJ 187 is a 7 bar user
Reputation: 10

Post rating: Votes: 0 Score: 0rate    
Default

Quote:
Originally Posted by howl View Post
This issue is related to the focus of the window, I haven't found the way to refocus stepmania.
On Windows, I click outside of the window and then back inside of it, that gets it working again (most of the time, anyways). I am not sure if it works on Linux, but I figure it's worth a shot. I usually find it happening after changing the resolution.
AJ 187 is offline   Reply With Quote
Old 11-07-2009, 06:40 AM   #8
howl
Member
 
Join Date: Nov 2009
Posts: 90
howl is a 2 bar user
Reputation: 10

Post rating: Votes: 0 Score: 0rate    
Default

Quote:
Originally Posted by AJ 187 View Post
On Windows, I click outside of the window and then back inside of it, that gets it working again (most of the time, anyways). I am not sure if it works on Linux, but I figure it's worth a shot. I usually find it happening after changing the resolution.
Yes, when changing resolution, at least, from one very small to one very high, the rest of options doesn't lost the focus. The problem is when stepmania is in fullscreen mode, there is no way to recover the focus because alt+tab doesn't work with sm in full.
howl is offline   Reply With Quote
Old 11-07-2009, 02:52 PM   #9
howl
Member
 
Join Date: Nov 2009
Posts: 90
howl is a 2 bar user
Reputation: 10

Post rating: Votes: 0 Score: 0rate    
Default

Well, I found it, don't know why I did't notice before. The crash happens when closing but during the game sound is ok, so the problem is something that should be done in the destructor of the driver, so, I added the pertinent funtions to close and free pulseaudio's needed varaibles and voila, the Damien's patch now works well.

Also solved another thing I notice. After using stepmania with pulse driver then is impossible to use the alsa-sw driver because hardware busy, but if you didn't uses before the pulse plugin it works, now there is no problem.

Exiting using pulse driver says:
Mixing 0.000000 ahead in 0 Mix() calls
Mixing underruns: 1

With alsa-sw:
Mixing 469.737000 ahead in 15148 Mix() calls
Mixing underruns: 8

Is normal that with pulse driver Mix has 0 calls?

The working pulse driver patch is this:
http://pastie.org/687933

I added the following lines:
Code:
	pa_context_disconnect(m_PulseCtx);
	pa_context_unref(m_PulseCtx);
	pa_threaded_mainloop_stop(m_PulseMainLoop);
	pa_threaded_mainloop_free(m_PulseMainLoop);
howl is offline   Reply With Quote
Old 11-08-2009, 03:32 PM   #10
howl
Member
 
Join Date: Nov 2009
Posts: 90
howl is a 2 bar user
Reputation: 10

Post rating: Votes: 0 Score: 0rate    
Default

I have been using it and seems to be stable. Could be possible to add it mainstream in StepMania SVN? The only thing I see is that doesn't follow the desing of the rest RageSoundDrivers and doesn't have methods like GetPlayLatency.

If I can I will try to adapt it with a PulseHelper to take out Pulse's specific code and make use of RageThreads, but, It will be the same but written in another way.

This driver can solve some problems that linux users report like sound stuttering, stepmania not in the default selected audio device, sound underruns...
howl is offline   Reply With Quote
Reply

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
language patch dragsteur[BW] General questions 0 06-08-2009 06:28 PM
How adding my own .cpp files to compilation SkuAir General questions 4 03-05-2009 04:39 PM
How do you patch the game? pickleperfect Song and Course questions 2 12-31-2008 04:09 AM
SM 3.9 and GCC 4.3 issues & patch StormByte General questions 0 04-22-2008 04:05 PM
Linux Compilation - does not work? akrus Crash questions 0 01-20-2007 06:34 AM


All times are GMT. The time now is 03:49 PM.


Powered by vBulletin® Version 3.8.5
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.

Thanks to

SourceForge.net Logo