View unanswered posts | View active topics It is currently Mon Jun 17, 2019 9:10 am



Reply to topic  [ 136 posts ]  Go to page 1, 2, 3, 4, 5, 6  Next
Linux/FreeBSD/Mac OS X etc sound 

Best audio API
SDL 20%  20%  [ 10 ]
AO 20%  20%  [ 10 ]
OpenAL 29%  29%  [ 14 ]
Semi Portable OSS 12%  12%  [ 6 ]
Non Portable ALSA 10%  10%  [ 5 ]
Non Portable CoreAudio 2%  2%  [ 1 ]
Other 6%  6%  [ 3 ]
Total votes : 49

Linux/FreeBSD/Mac OS X etc sound 
Author Message
ZSNES Developer
ZSNES Developer
User avatar

Joined: Tue Aug 17, 2004 5:24 am
Posts: 812
Location: In your garden
Reply with quote
Post Linux/FreeBSD/Mac OS X etc sound
Edit:
Please skip to this post: http://board.zsnes.com/phpBB2/viewtopic ... 862#136862

Note when voting, if you select a non portable API, you will be locking out many users of ZSNES.
----------------------------------------------------------------------

Ok so I have come to the conclusion that SDL will not meet our needs for ZSNES audio so I am going to write my own audio driver for OSS and ALSA. This will allow ZSNES to output it's sound with much increased accuracy and should be very close to the real thing. My question is what does everyone use/prefer when it comes to sound. For sure I will be developing an OSS driver but how many of you prefer ALSA and/or what other audio interfaces would you like to see. Tutorials and/or SDK documentation links would be good too if you suggest something.


Sun Feb 12, 2006 1:56 am
Profile
Reply with quote
Post 
SDL outputs to whatever driver you are using Pagefault. Having an ALSA or OSS driver would be completely unneccessary. Besides certain chipsets do not yet have ALSA drivers and have only Proprietary OSS drivers. Secondly SDL contains OSS, ALSA, AudioIO, and other audio driver support vectors. Moving from a consolidated code to a external code would only make problems for people running Solaris, FreeBSD, etc. because some distros don't use ALSA or OSS at all.

It would be best to leave it be and use the SDL code base for the best interest of compatibility.

Why exactly is SDL not working as it should? What version are you using also?

It's almost like saying DirectSound isn't doing what we want so we are going to use A3D 3.0 as our new audio driver. Now for starters, not all cards and chipsets even support A3D 3.0 which by native was built for Aureal sound cards though a certain few like Creative's Emu10kx and some older SoundBlaster chipsets support it via a wrapper. Nowadays some cards contain no support at all for it and even those who once had Sensaura3D support and an A3D 1.0 wrapper have removed that as well.

It would be best to use what we have till SDL gets updated again (it could be your kernel too as certain 2.4 kernels have really awful SDL audio with ALSA but with 2.6 kernels it's as crisp and clear as DirectSound is on Windows).


Sun Feb 12, 2006 2:14 am
Winter Knight
User avatar

Joined: Mon Aug 16, 2004 10:16 pm
Posts: 467
Reply with quote
Post 
The problem is that SDL sound is shit in comparison to using ALSA or OSS directly.

And I will be freakin' surprised if there's a soundcard that isn't supported by ALSA or OSS, even the commercial variant of the latter.


Sun Feb 12, 2006 2:37 am
Profile WWW
Locksmith of Hyrule
User avatar

Joined: Sun Aug 08, 2004 7:49 am
Posts: 3634
Location: 255.255.255.255
Reply with quote
Post 
ALSA, hands down.

_________________
Image
<Nach> so why don't the two of you get your own room and leave us alone with this stupidity of yours?
NSRT here.


Sun Feb 12, 2006 2:41 am
Profile YIM WWW
Reply with quote
Post 
How can ALSA have better code when the ALSA core of SDL uses whatever is compiled by your system wether it be OSS, ALSA, or AudioIO? It's a pointless argument IMO because there is no point if you see what you compiled SDL for and with. SDL formulates itself to whatever default audio YOU compile it for and it uses those headers and libraries unless you use the default distribution but most distros use ALSA anyway. My system uses ALSA and I actually rebuilt a CVS download of SDL with ALSA as it's default audio driver and even though I knew it was using ALSA it still sounded pretty good but my SDL always outputed to ALSA.

I'm dead serious when I say it's more or less your kernel especially if you use kernel 2.4.xx as I have experienced this first hand. I even posted on this once saying I was wondering why 2.6.xx made it sound better. Well for starters ALSA is the native core audio of 2.6.xx, 2.6.xx has better handling instructions at the kernel core, and really 2.4.xx is dinoware IMO. Plus, it can also be your sound card/chipset as well. With Linux I say if you want great audio go Creative labs products or someone with good Linux support and quality proprietary drivers. All those ADI, Crystal, C-Media, and other low-end cards and chipsets just do not cut it.

I'm only saying this because many NON-Linux or BSD based distros do NOT use ALSA or OSS natively. Yes 4-Front's OSS Retail version does have many UNIX distros covered but I highly doubt anyone here is going to shell out the cash just to get the compatibility or switch to a Linux w/ ALSA distro just for ZSnes to have audio. I don't even think ANY BSD based distro even begins to support ALSA. AFAIK ALSA is Linux ONLY.

This is no different that asking for OpenAL as the audio rendering driver. If you want an answer on that look for the topic regarding it and find the answer in there. Like it or not SDL is the BEST choice we have to deal with compatibility and cross-platform wise.

And if you still think SDL is crap check this document over and then made an informed and educated re-evaluation before judging. It might not even be SDL.

http://osdl.sourceforge.net/OSDL/OSDL-0 ... audio.html


Sun Feb 12, 2006 9:15 am
Lurker
User avatar

Joined: Sun Jan 30, 2005 10:06 pm
Posts: 109
Location: Wouldn't you like to know?
Reply with quote
Post 
I believe I read somewhere that FreeBSD's sound core is based on OSS, although how this can be since OSS is closed-source ie beyond me. I haven't done a lot of sound programming, so I'd say whatever you can do to make ZSNES's sound better for the *nix croud would be the best choice.

_________________
SNES Sprite Animations, made by an Insane Killer Robot.
I'm a computer programmer (in C++) and a future game designer.


Sun Feb 12, 2006 10:19 am
Profile WWW
Winter Knight
User avatar

Joined: Mon Aug 16, 2004 10:16 pm
Posts: 467
Reply with quote
Post 
Only OSS/commercial is closed-source, otherwise the entirely free implementation available in the kernel wouldn't exist.

Bahamut_ZERO_939 or whatever, shut up. Even commercial games such as UT99 use OSS directly when they use SDL for rendering, and they're paid to deliver a working product.


Sun Feb 12, 2006 3:03 pm
Profile WWW
ZSNES Developer
ZSNES Developer
User avatar

Joined: Tue Aug 17, 2004 5:24 am
Posts: 812
Location: In your garden
Reply with quote
Post 
The problem is that SDL gives almost no control over the sound stream, you cannot check to see how much of the buffer has played which makes it very hard to make the audio sync up with video. By writing my own driver for OSS and ALSA I will be able to do such things. SDL audio is pretty much designed for applications that do not need explicit timing of audio output and more designed for PC games, not emulators. Pretty much with OSS supported almost every OS will be supported. I may keep the SDL audio but it will not be the default for linux at least. OSS is open enough that it is supported in the linux kernel and freebsd which is pretty much most of the userbase anyway.


Sun Feb 12, 2006 8:13 pm
Profile
Reply with quote
Post 
Wow. Video buffers that can't be stretched. Audio buffers that can't be used for streaming. Zero tie-ins to any kind of OS-native user interface. And it's still painfully slow.
Why in the hell is SDL so popular, anyway?

Seriously, checking the playback position of an audio buffer is necessary for just about anything besides playing short wave clips. Thanks for mentioning that pagefault, I'll be sure to avoid SDL audio completely now.


Sun Feb 12, 2006 9:16 pm
Reply with quote
Post 
Because it's the only mainstream open source API foundation layer Linux has besides Allegro and straight up native coding that's cross-pltaform off x86 where the same code base can be used to create greater portability of C/C++ based applications.

Aerden stuff it up your ass sideways and go fart off. It's called discussion and everyone having a say. Page made his arguement and so did I, don't like it, don't post replies. He did finally bring up why though as it gives to control of streaming. He is right and I never noticed it right away till he brought it up. This could also be why some projects have SDL but also native OpenGL, ALSA, and other APIs coded natively. mPlayer is one that comes to mind about this.

Hmmm... maybe this could be requested of SDL to add things like this it needs. It never hurts to ask.


Mon Feb 13, 2006 2:24 am
ZSNES Developer
ZSNES Developer

Joined: Tue Dec 28, 2004 6:47 am
Posts: 6747
Reply with quote
Post 
Just because SDL is supported on all of the major OSes and uses all the major APIs.. doesn't make it good.

Programmers pick the languages and tools that best suits their needs... it does really sound like SDL needs lots more work before it can be considered "good" by any stretch of the imagination... not to say that it's not used.. it's just not good for a specific purpose (it is probably better for a smaller general purpose)...

_________________
Continuing FF4 Research...


Mon Feb 13, 2006 4:35 am
Profile
Reply with quote
Post 
People try to compare it to DirectX sometimes which isn't good. DirectX has lots more tools especially for debugging purposes SDL doesn't. Don't get me wrong. It's a great API to use but it really lacks debugging features most native and alternative APIs have.

One Audio API that ZSnes could use across Win32, UNIX, and a few other OSes, although it's not free is FMOD. It's a great toolkit, has good debugging tools, is one of a few APIs with 3D audio and environment extensions(well it and OpenAL are really well... it). And I doubt ZSnes would ever use it but it just one more one the list of availability.

I really wish ALSA could get it's own 3D audio engine or extensions. Sensaura, A3D, and EAX are all owned by Creative and most people know how they like to just give things away especially for 3D audio code. Sensaura and A3D are now both dead and Creative won't even let many if not anyone have Sensaura or A3D support anymore without a nasty fee.


Mon Feb 13, 2006 11:41 pm
ZSNES Developer
ZSNES Developer

Joined: Tue Dec 28, 2004 6:47 am
Posts: 6747
Reply with quote
Post 
Bahamut_ZERO_939 wrote:
One Audio API that ZSnes could use across Win32, UNIX, and a few other OSes, although it's not free is FMOD. It's a great toolkit, has good debugging tools, is one of a few APIs with 3D audio and environment extensions(well it and OpenAL are really well... it). And I doubt ZSnes would ever use it but it just one more one the list of availability.


The purpose of FMOD was to be able to program sound and not worry about the details about a certain API.. like DirectSound and EAX. I've heard many good things about it. Snes9x uses it as well.

The real question is whether it is worth spending on and whether it causes conflicts with the ZSNES license... and you have to wonder if it is a good thing to program on (according to the devs).

Quote:
I really wish ALSA could get it's own 3D audio engine or extensions. Sensaura, A3D, and EAX are all owned by Creative and most people know how they like to just give things away especially for 3D audio code. Sensaura and A3D are now both dead and Creative won't even let many if not anyone have Sensaura or A3D support anymore without a nasty fee.


It really doesn't matter (at least in ZSNES's case) whether or not it has support audio extensions. Sensura is used in the UT series though I never expected it to live (it had limited impact in the first place). A3D died with Aureal (yes Creative owns that now, but it's a dead API for all intents and purposes.. and it was mainly specific for Aureal based hardware originally). Creative isn't stopping anyone from using it.. there's just no support for it anymore (software developers see it as a dead end, hardware manufacturers aren't building hardware and writing drivers for it).

There's no point in introducing new stuff unless you have something worth looking at (and in this case it is not worth listening to). Unless you have a standard (or a closed standard to begin with initially) that is really good, it's just not going to matter. Audio technology really hasn't progressed the same way 3D rendering has... so it's not that surprising.

_________________
Continuing FF4 Research...


Tue Feb 14, 2006 12:37 am
Profile
ZSNES Developer
ZSNES Developer
User avatar

Joined: Tue Aug 17, 2004 5:24 am
Posts: 812
Location: In your garden
Reply with quote
Post 
Bahamut_ZERO_939 wrote:
One Audio API that ZSnes could use across Win32, UNIX, and a few other OSes, although it's not free is FMOD.


This answers itself.


Tue Feb 14, 2006 4:42 am
Profile
ZSNES Developer
ZSNES Developer

Joined: Tue Dec 28, 2004 6:47 am
Posts: 6747
Reply with quote
Post 
pagefault wrote:
Bahamut_ZERO_939 wrote:
One Audio API that ZSnes could use across Win32, UNIX, and a few other OSes, although it's not free is FMOD.


This answers itself.


So.. is that what you're using or planning to use?

_________________
Continuing FF4 Research...


Tue Feb 14, 2006 4:50 am
Profile
ZSNES Developer
ZSNES Developer
User avatar

Joined: Tue Aug 17, 2004 5:24 am
Posts: 812
Location: In your garden
Reply with quote
Post 
No, it means we won't use it because it's not free. We are using OSS/ALSA.


Tue Feb 14, 2006 5:04 am
Profile
Rookie

Joined: Mon Oct 10, 2005 12:02 pm
Posts: 21
Reply with quote
Post 
I use OSS output for all audio output when possible.
The only annoying issue is for people who have crappy soundcards that block the device while its in use.
People really need good soundcards that can play multiple streams in hardware such as any card based on an emu10k1 chipset.
Single stream capable chipsets like most onboard sound and intel audio are just plain garbage.


Wed Feb 15, 2006 11:03 am
Profile
Winter Knight
User avatar

Joined: Mon Aug 16, 2004 10:16 pm
Posts: 467
Reply with quote
Post 
If that is a problem, they can use ALSA-dmix.


Wed Feb 15, 2006 8:47 pm
Profile WWW
ZSNES Developer
ZSNES Developer
User avatar

Joined: Tue Aug 17, 2004 5:24 am
Posts: 812
Location: In your garden
Reply with quote
Post 
The ALSA code is nearing completion. Once it has reaches a stable point OSS support will be added so there will be little problems with people using it on any flavour of unix.


Thu Feb 16, 2006 3:44 am
Profile
Rookie

Joined: Mon Oct 10, 2005 12:02 pm
Posts: 21
Reply with quote
Post 
Aerdan wrote:
If that is a problem, they can use ALSA-dmix.


ALSA-dmix is just as bad as artsd or esd mixing. It sounds pretty crappy. dmix is just a cludge.


Fri Feb 17, 2006 5:32 am
Profile
Winter Knight
User avatar

Joined: Mon Aug 16, 2004 10:16 pm
Posts: 467
Reply with quote
Post 
orly

I have *never* had extra line noise with dmix, I have *never* had to kill someone's zombied daemon with dmix.

In my view, it is the best option for software mixing available at this time.


Fri Feb 17, 2006 9:27 am
Profile WWW
Rookie

Joined: Mon Oct 10, 2005 12:02 pm
Posts: 21
Reply with quote
Post 
Aerdan wrote:
orly

I have *never* had extra line noise with dmix, I have *never* had to kill someone's zombied daemon with dmix.

In my view, it is the best option for software mixing available at this time.


Sure it is, considering its the only option out there that doesn't make use of a crappy daemon aside from a real dsp that can hardware mix.


Fri Feb 17, 2006 12:11 pm
Profile
Reply with quote
Post 
Spike wrote:
People really need good soundcards that can play multiple streams in hardware such as any card based on an emu10k1 chipset.
.


The problem is nobody wants to use Creative for Linux Audio, they have to because nobody wants to create a suitable driver with enough abilities to match Creative's. Creative does a lot for Linux audio, yes, but so could other chipset developers like Realtek, Nvidia, Intel, and others.


Tue Mar 07, 2006 11:49 pm
ZSNES Developer
ZSNES Developer
User avatar

Joined: Tue Aug 17, 2004 5:24 am
Posts: 812
Location: In your garden
Reply with quote
Post 
Pre-release code for the OSS output has been released. It is known to be buggy on some cards, please share your experience here.

http://zsnes.game-host.org/~pagefault/sdllink.c

Also if you have experience with OSS sound it would be appreciated to have some input on it. It works 100% fine on my card but on grinvader's and Nach's card it does not.


Mon Mar 20, 2006 6:48 am
Profile
Rookie

Joined: Mon Oct 10, 2005 12:02 pm
Posts: 21
Reply with quote
Post 
I got it working on my emu10k1.

if (ioctl(fdAudio, SNDCTL_DSP_SETFRAGMENT, "32") == -1)
fprintf(stderr, "Could not set PCM format on device.\n");

fragment size should be set to something sensible...

if (ioctl(fdAudio, SNDCTL_DSP_SPEED, &oss_samplerate) == -1)
fprintf(stderr, "Could not set PCM format on device.\n");

and of course set the samplerate!

Cheers.

Nice job tho, sounds really crisp now compared to that SDL junk.

Now the 100% cpu gremlin needs fixing....


Mon Mar 20, 2006 11:51 am
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 136 posts ]  Go to page 1, 2, 3, 4, 5, 6  Next

Who is online

Users browsing this forum: No registered users and 8 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by ST Software.