What's new

Guilherme's alsa plugin 0.4

Hacktarux

Emulator Developer
Moderator
It's released in this thread and here's what Guilherme had to say about it:
"This version is working quite well but the sound is not good, it has too much noise. But I hope I will get rid of this some time ;)"
 

txOjO

MDKEiToR
Sound much better than my DVD ...

GOD GOD GOD GOD and GOOD and GOOD and GOOD and GOOD!
I say this for the 4th time.
This is (for me) the best plugin tried in mupen64.
Old betas, not bad but the sound isn't good in various games.
In the 0.3 , turn around my words :)
In this release , (the best) the sounr is near perfect in any game i tried.
GOD and GOOD work Guillerme !!! :king:
 

guilhermef

New member
txOjO said:
GOD GOD GOD GOD and GOOD and GOOD and GOOD and GOOD!
I say this for the 4th time.
This is (for me) the best plugin tried in mupen64.
Old betas, not bad but the sound isn't good in various games.
In the 0.3 , turn around my words :)
In this release , (the best) the sounr is near perfect in any game i tried.
GOD and GOOD work Guillerme !!! :king:


Thank you! Now, if I just could ask you, did you try to fuss with the options and values available in the configuration dialog? Specially the one about synchronization... If you did ( or will do ) please let me know. Once againg, thanks!
 

txOjO

MDKEiToR
Yes i'ts fine!
Only found a problem when compilation , reference to the channels or similar.
But nothing more important for a global compilation(in gui select channels only crash). :n64:
Sorry remember one thing :D ...
I try "better syncronization" for pure alsa, but nothing changes noted.
Some games speedy audio with all the options available
Example: Diddy kong racing plays at full speed(on my machine) but the sound are buggy in various stages, try better sound syncronization and the results is more buggy(buggy= some ralentizations) and in the 0.3b not.
The syncronization is better with this option activated or not(0.4b) than a 0.3b
Sorry if my bad english isn't capably read for you ,I try to study some in this year :)
 
Last edited:

Zilla

夢を見られた
I'm unable to compile this under mdk 9.2, is it possible to post a binary?
 

guilhermef

New member
Binary version

Zilla said:
I'm unable to compile this under mdk 9.2, is it possible to post a binary?
I'm not sure... you see, if you could not compile maybe some required library is not available in your system, not because of any incompatibility - I use Mdk 9.1 and there is virtually no difference between these two versions - but because it is not installed. This plugin requires:

- libgtk+1.2 ( -devel to compile );
{ Warning: the script gtk-config is mandatory and is included in the devel package; it needs to be in your $PATH }
- libglib1.2 ( -devel to compile );
- libalsa2-0.9( -devel to compile );
- libstdc++5 (-devel to compile );
{ Warning: mdk provides compatibility versions of libstdc++; only version 5 will work }

To compile it, basically, that is what you need. So, check whether you have these packages installed and should you still encounter problems mail me the results of the compilation, like this:
make 2>output.txt ( without spaces between '2' and '>' ).

Based on this file I will be able to tell the problem, and maybe provide you with a binary version

Guilherme
 

txOjO

MDKEiToR
I havn't problem with mandrake 9.2 or compilation :)
The best ALSA plugin made gillermef.
Maybe...next version expect much more :)
Have you got idea from how make sound with 5.1 channels? don't "work"(the option 4 chan , 5 chan or 6 chan) in my machine, only the two channels can do, and sound is very good on the 6 speakers :)
 

russofris

New member
Good afternoon,

I am attempting to compile this and am receiving the following error.

Code:
h2so4 alsa_plugin # make
g++ -DNO_DEBUG -DNDEBUG -O2 -Wall -mcpu=athlon-xp -march=athlon-xp -fomit-frame-pointer -ffast-math -fno-rtti -c -o audio.o audio.cpp
audio.cpp: In member function `bool Plugin_Audio_Driver::initAlsa()':
audio.cpp:195: error: non-lvalue in unary `&'
make: *** [audio.o] Error 1

I noticed that the tar.gz that you posted was for P4 only, so I set the march and mcpu to athlon-xp. This does not resolve the problem though, and I believe that the error stems from me running GCC 3.3.2 (as opposed to 3.2 as stated in the readme) on my gentoo box. Any suggestions would be greatly appreciated.

Thank you for your time,
Frank Russo
 

Zilla

夢を見られた
The above error is the same as mine, I'm also using an Athlon. (Hmm seems I've broken a lot of things in Mandrake.. :( )
 

guilhermef

New member
russofris said:
... This does not resolve the problem though, and I believe that the error stems from me running GCC 3.3.2 (as opposed to 3.2 as stated in the readme)

You're right. GCC with every version becomes more and more strict and more compliant with the standards, which is very good. Now, the code in that line ( 195 ) is really misconstrued and gcc 3.3 is right to complain. It is fixed in the new version( unreleased ) but for now you could comment out the line ( precede it with a // ) and put instead: var_int = 2;

Luckily this is enough ( I do not have gcc 3.3 ).
Any problems, just drop a line ;)

Guilherme
 

Zilla

夢を見られた
Cheers! :)

Well, I successfully compiled it by changing the makefile setting to qt3 (Looks Very nice BTW) :cool:

But the plugin is segfaulting (the same happens with every ROM I've tried):
Code:
[root@apogee mupen64-0.3]$ mupen64
rom size: 8388608 bytes (or 8 Mb or 64 Megabits)
file found
rom size: 8388608 bytes (or 8 Mb or 64 Megabits)
byteswaping rom...
rom byteswaped
rom loaded succesfully
80 37 12 40
ClockRate=f
Version:1444
CRC: 635a2bff 8b022326
name: SUPER MARIO 64
Manufacturer: Nintendo
Cartridge_ID: 4d53
Country : United States
size: 4096
PC= 80246000
md5 code:20B854B239203BAF6C961B850A4A51A2
init timer!
memory initialized
Segmentation fault
After this I had to restart the alsa daemon as I was getting distorted sound in other apps, then switched back to Jttl's plugin/glN64 (everything works fine again).

I've tried both plugin settings (ALSA native and OSS) all others I've left at default.

I'm using the module CS46xx. Any Ideas? The Compilation was pretty flawless, only about three warnings...... :huh:
 

blight

New member
guilhermef: if you use `uname -r` instead of athlon-xp for -mcpu= and -march= switches in the Makefile it will automagically :p optimize for the HOST OS
 

guilhermef

New member
Zilla said:
Well, I successfully compiled it by changing the makefile setting to qt3 (Looks Very nice BTW) :cool:

But the plugin is segfaulting (the same happens with every ROM I've tried) ...
I've tried both plugin settings (ALSA native and OSS) all others I've left at default.

I'm using the module CS46xx. Any Ideas? The Compilation was pretty flawless, only about three warnings...... :huh:

blight said:
guilhermef: if you use `uname -r` instead of athlon-xp for -mcpu= and -march= switches in the Makefile it will automagically :p optimize for the HOST OS


Well, the best thing you should do is: leave any hard optimization aside, that is, compile with -O2 and that is all. Besides, it won't matter much as most of the processing is made 'outside', by the sound driver.

And, blight, `uname -r` is supposed to return the kernel release( according to the program ), but actually returns the kernel version. However, `uname -m` returns the kernel architecture, which is not up to date with gcc3 architecture naming convention. For instance, in my machine it returns i686 instead of pentium4( I did compile the kernel for a pentium4).
Still, it might do some optimization without producing ambiguous or broken code.

Be as it may, I will see what I can do.

Guilherme
 

russofris

New member
Zilla said:
The above error is the same as mine, I'm also using an Athlon. (Hmm seems I've broken a lot of things in Mandrake.. :( )


I've managed you find an i386 binary on the web that works well for me. Once mupen implements a frame-rate limiter, this plugin should be good to go. I have noticed that if the game plays too slow, the sound crackles. If the game plays to fast, the sound is fine, but the video stutters. I have to keep changing the resolution of each game that I play to keep the framerate consistent. (1280x1024 for BanjoeK, 800x600 for SMB, and 1024x768 for zelda).

Hacktarus, Is there any chance that you could produce a few optimized binaries for the next release? Or perhaps a generic i386 binary for all of us in GCC 3.3.X land?

Nice plugin BTW.

Thank you for your time,
Frank Russo
 

russofris

New member
Zilla said:
The above error is the same as mine, I'm also using an Athlon. (Hmm seems I've broken a lot of things in Mandrake.. :( )

Zilla, I have tested and it works

So, to sum up..

Step 1

Open the makefile, Change the MCPU and MARCH values to athlon-xp (or uname -r).

Step 2
Open the audio CPP file
comment out line 195 by putting // in front of the line
Should look like this

Code:
//	snd_pcm_hw_params_get_channels_max( hw_params, &( uint )var_int );
 var_int = 2;
	if ( ( var_int & dev ) == 2 ) return false;

save it and run make. Copy the .so to your plugins directory.

I hope that this helps you,
Frank Russo
 

JttL

New member
russofris said:
I've managed you find an i386 binary on the web that works well for me. Once mupen implements a frame-rate limiter, this plugin should be good to go. I have noticed that if the game plays too slow, the sound crackles. If the game plays to fast, the sound is fine, but the video stutters. I have to keep changing the resolution of each game that I play to keep the framerate consistent. (1280x1024 for BanjoeK, 800x600 for SMB, and 1024x768 for zelda).

To be accurate, there is a frame-rate limiter in mupen64, it's just disabled by default. At the moment the speed is limited by sound plugin but I have been experimenting with this build-in frame-rate limiter turned on (I didn't get very good results with it because at least in the SDL sound plugin it's very important that the plugin can control the speed itself to maintain correct buffer load level). Maybe Hacktarux could repost those instructions to enable this build-in frame-rate limiter as the original message has been removed. I don't remember where those few functions are which should be uncommented.
 
OP
Hacktarux

Hacktarux

Emulator Developer
Moderator
The limiter is in new_vi in main/gui_gtk/main_gtk.c.
Uncomment the content of this function if you want to activate it, but be warned that it's always better to leave the sound plugin do it.
 

Top