Cyberdemon
Register | User Profile | Member List | F.A.Q | Privacy Policy | New Blog | Search Forums | Forums Home
Doomworld Forums : Powered by vBulletin version 2.2.5 Doomworld Forums > Classic Doom > Source Ports > Officially had it with SDL
Pages (3): [1] 2 3 »  
Author
All times are GMT. The time now is 23:26. Post New Thread    Post A Reply
Csonicgo


Posts: 4450
Registered: 03-04


I'm getting sick of SDL's lack of (or glacial) progress and its horrible track record. Considering that it's the only free implementation of a media library that the Doom community uses, this affects a lot of ports.

I showed EE off to a few friends this morning on a friend's new computer. What happened? The engine deadlocked for a second on looping midi, sounds cut off and popped, and the midi was off tempo and lagged a bit. gameplay was fine, but the sound was horrible. Same for Prboom, Chocolate Doom and any others we tried. I know EE's sound code, and it is NOT the reason for the total embarrassing performance they saw. It was SDL and only SDL. This is a brand new AMD box with a brand new AMD video card and a solid dedicated soundcard. I can't blame his hardware.

This is not solid. this is horrible. And we've been putting up with it for years. Dare I say the entire open source gaming community has to deal with this clunker, and it's time to throw it out. The only problem is that there is NO alternative. This makes the ports look bad, play bad, sound bad. All those hours coding and tweaking are futile if the display and sound do not work properly.

And I have zero idea of what to do about this.


EDIT: I forgot to mention that in Prboom, the mouse cursor actually showed up over the gameplay screen and stayed there. I have no idea how. That's never happened to me, ever.

Old Post 05-29-13 05:57 #
Csonicgo is offline Profile || Blog || PM || Email || Homepage || Search || Add Buddy IP || Edit/Delete || Quote
printz
CRAZY DUMB ZEALOT


Posts: 8885
Registered: 06-06


Eternity uses outdated versions of SDL, SDL_mixer and SDL_net, by one minor version number. I tested Windows Eternity with the newest SDL_mixer and there were no MIDI loop deadlocks. I recompiled Eternity for that; I'm not sure if you have to recompile Eternity just for replacing the SDL version.

On OSX I get very good MIDI with the latest stable SDL_mixer. Conversely, ZDoom's MIDI (FMOD?) sounds very bad: most instruments can't sustain.

What about development versions of SDL and satellites?

__________________
Automatic Wolfenstein - Version 1.0 - also on Android

Old Post 05-29-13 06:41 #
printz is offline Profile || Blog || PM || Homepage || Search || Add Buddy IP || Edit/Delete || Quote
Csonicgo


Posts: 4450
Registered: 03-04


I know I use the latest versions in my compiles and on my system. I have no idea what versions we ship out. Those may be outdated. If that is the problem, this is a big problem. If we're shipping EE out with older SDL versions, we are hurting things. We need to come together on what versions to use. I asked about this in #doom-tech and it seems that we use some extremely old versions.

If we can get new MinGW32 compiles of SDL for windows ports, I think we would be set. MinGW32 is best because it works on all windows versions, unlike the 64 fork. MinGW32 also updated recently. If I need to do it I can attempt my hand at it; Though I would like to see someone with much more experience than me try his hand at it.

Old Post 05-29-13 06:46 #
Csonicgo is offline Profile || Blog || PM || Email || Homepage || Search || Add Buddy IP || Edit/Delete || Quote
Csonicgo


Posts: 4450
Registered: 03-04


Can everyone that uses SDL tell me what versions they have?

Old Post 05-29-13 09:27 #
Csonicgo is offline Profile || Blog || PM || Email || Homepage || Search || Add Buddy IP || Edit/Delete || Quote
fraggle
Filled with the code of Doom


Posts: 7730
Registered: 07-00


Personally I've never had a huge problem with it. Perhaps I'm sheltered from the problems because I rarely ever use Windows nowadays.

Old Post 05-29-13 09:59 #
fraggle is offline Profile || Blog || PM || Email || Homepage || Search || Add Buddy IP || Edit/Delete || Quote
Stroggos
Junior Member


Posts: 181
Registered: 04-09



Csonicgo said:
Can everyone that uses SDL tell me what versions they have?


I use SDL 1.2.15 when I need something done quick. But, I don't like using the other SDL_* libs.

Old Post 05-29-13 10:05 #
Stroggos is offline Profile || Blog || PM || Homepage || Search || Add Buddy IP || Edit/Delete || Quote
Csonicgo


Posts: 4450
Registered: 03-04



fraggle said:
Personally I've never had a huge problem with it. Perhaps I'm sheltered from the problems because I rarely ever use Windows nowadays.


Not to be a jerk but I think that's the problem with the SDL devs too. Windows isn't going away. Its time to support DirectX besides 5 and sound besides 8 channels. Windows support of SDL is barely there. Maybe the other way around.

I mean SDL DOESN'T SUPPORT DIRECTINPUT. GAAH

Old Post 05-29-13 11:41 #
Csonicgo is offline Profile || Blog || PM || Email || Homepage || Search || Add Buddy IP || Edit/Delete || Quote
Gez
Why don't I have a custom title by now?!


Posts: 11214
Registered: 07-07



printz said:
ZDoom's MIDI (FMOD?)

It's up to you.

Old Post 05-29-13 11:44 #
Gez is online now Profile || Blog || PM || Search || Add Buddy IP || Edit/Delete || Quote
Csonicgo


Posts: 4450
Registered: 03-04


I just checked my SDL libraries and they don't even have version information. They were compiled in January so I suppose it's the latest. Ugh. I'll see what I can do.

Old Post 05-29-13 11:54 #
Csonicgo is offline Profile || Blog || PM || Email || Homepage || Search || Add Buddy IP || Edit/Delete || Quote
RTC_Marine
Junior Member


Posts: 544
Registered: 06-01


If only this supported midi..

Old Post 05-29-13 11:57 #
RTC_Marine is offline Profile || Blog || PM || Email || Homepage || Search || Add Buddy IP || Edit/Delete || Quote
sirjuddington
Slade doesn't mean what it used to


Posts: 1405
Registered: 05-00



RTC_Marine said:
If only this supported midi..

Well, there is this, but it just uses fluidsynth anyway.

Old Post 05-29-13 13:44 #
sirjuddington is offline Profile || Blog || PM || Email || Homepage || Search || Add Buddy IP || Edit/Delete || Quote
Quasar
Moderator


Posts: 6088
Registered: 08-00


One reason I did not go through with the upgrade, aside from lack of time to test it, was the note in fraggle's changelog about the new SDL_net being broken.

I'd like some explanation on what that means and whether or not I need to avoid upgrading some of the libraries.

Old Post 05-29-13 13:49 #
Quasar is online now Profile || Blog || PM || Email || Homepage || Search || Add Buddy IP || Edit/Delete || Quote
printz
CRAZY DUMB ZEALOT


Posts: 8885
Registered: 06-06


Interesting. I tried to test multiplayer OSX EE with another Doomer (who posts around here), just by using the -net command-line parameter, and it did fail. Sure enough, I was using the latest SDL_net. I wonder if you can use an older SDL_net with the newest SDL.

__________________
Automatic Wolfenstein - Version 1.0 - also on Android

Old Post 05-29-13 13:55 #
printz is offline Profile || Blog || PM || Homepage || Search || Add Buddy IP || Edit/Delete || Quote
Chu
Forum Regular


Posts: 734
Registered: 10-02


SDL 1.2.14.0 here, slightly older but I've experienced no issues with EDGE/3DGE on any Windows-based system. Interesting you mentioned those problems, it makes me want to test the port on other PCs and see if I get the issue. So far though, 3DGE seems covered on this side - no sound/stuttering issues at all.

And about MinGW32, that's what I use to compile 3DGE. I try to update all of the libs it uses, but I think I stuck with the older SDL for some reason. Not complaining, though.

__________________
3DGE source port

Old Post 05-29-13 18:20 #
Chu is offline Profile || Blog || PM || Homepage || Search || Add Buddy IP || Edit/Delete || Quote
wesleyjohnson
Senior Member


Posts: 1032
Registered: 04-09


DoomLegacy: We do not ship SDL with the binary.

It varies as we support anything we can. My Linux 2.4 does not have RWOPs, so DoomLegacy detects the SDL version (I am guessing ver 1.2)
and uses the temp file method of playing midi for old SDL.
With Linux 2.6, it uses RWOPs.

On Win98, will compile and run with SDL.

On DOS and OSX, uses Allegro.

On Win, can compile DirectX

On Linux, can compile for X, or use SDL.

Old Post 05-29-13 20:25 #
wesleyjohnson is offline Profile || Blog || PM || Search || Add Buddy IP || Edit/Delete || Quote
Csonicgo


Posts: 4450
Registered: 03-04



wesleyjohnson said:
DoomLegacy: We do not ship SDL with the binary.

It varies as we support anything we can. My Linux 2.4 does not have RWOPs, so DoomLegacy detects the SDL version (I am guessing ver 1.2)
and uses the temp file method of playing midi for old SDL.
With Linux 2.6, it uses RWOPs.

On Win98, will compile and run with SDL.

On DOS and OSX, uses Allegro.

On Win, can compile DirectX

On Linux, can compile for X, or use SDL.



does this mean we need an additional, separate zip file for the SDL library?

Old Post 05-29-13 21:02 #
Csonicgo is offline Profile || Blog || PM || Email || Homepage || Search || Add Buddy IP || Edit/Delete || Quote
wesleyjohnson
Senior Member


Posts: 1032
Registered: 04-09


Means that the user installs the appropriate SDL for their system, like they would any other library. SDL is not hard to find and there is no need for us to re-distribute their libraries.

The DoomLegacy binary is dynamic linked against the SDL headers.
The header "/usr/include/SDL/SDL_version.h" contains the version numbers.
There are a couple of macros defined there that the code could use to print out the SDL version number of the headers as it was compiled. I did not look closely, but this would NOT give the SDL version number for the dynamically linked library.

On Linux 2.4 I am linking against SDL version 1.2.13,
on Linux 2.6 I am linking against SDL version 1.2.14.
On 64 bit Linux it is compiled by SmiteMeister who may have a more recent SDL version.

Any user can install a more recent SDL and run DoomLegacy as long as it is backward compatible with these headers.

Compiling against the latest headers would not hurt as long as the interface has not changed. If the interface changes, it would break compatibility with older SDL installations, and some users have to run the older SDL versions.

I do not know of any specific complaints about dynamically linking SDL. Have the usual problems with the windows changes messing up previous SDL libraries, and the implications of partially implemented handlers in SDL for some stuff (some querys as to video capability seem to never return true).

Last edited by wesleyjohnson on 05-30-13 at 22:50

Old Post 05-30-13 22:28 #
wesleyjohnson is offline Profile || Blog || PM || Search || Add Buddy IP || Edit/Delete || Quote
Holering
Member


Posts: 327
Registered: 01-03


I feel your pain Csonicgo. Seriously. I've been dealing with sdl_mixer's crap for like 3-4 years. I've tried hacking sdl_mixer for different sound options and it just doesn't sound good ever. There's also something else going on beside sdl_mixer which I notice with eternity and prboom++; they both play midi instruments at different volume levels (maybe this is in relation to the mus code).

The best option IMO is for developers to incorporate timidity++ for midi playback. It's the best sounding midi you can get through software as far as I know (this is probably why it can act as a hardware midi module) and it's even better than some hardware modules; you can emulate various midi modules in fact and a lot of options for power users exist. Zdoom on linux (I use slackware) sounds really good with timidity++ and I don't even need it running in the background (supposedly fmod calls timidity++ on demand). Would be really nice if developers added timidity++ support (or the option to choose a hardware midi device).

I'm sorry man...



fraggle said:
Personally I've never had a huge problem with it. Perhaps I'm sheltered from the problems because I rarely ever use Windows nowadays.

I don't understand how someone can not have issues with SDL if they're not on Windows. SDL_mixer has so many problems with volume envelope, wrong instrument levels, wrong stereo panning (sometimes stuff sounds mono and horrid), reverb issues and many other flaws (this is on Linux btw and I've even altered source files with higher sampling rates (defaults to 32000khz which is lower than a Gravis ultrasound), lower latency, and other improvements but it still really sucks). It's really noticeable when switching from sdl_mixer to timidity++. I think people who don't notice any issues either haven't heard proper midi playback or they just don't really care cause they can simply hear some kind of music (even when it's broken). There's a "HOW TO: Timidity for PrBoom-Plus" thread where Mike.Reiner and HackNeyed mention problems with instruments in Doom 2 map 05 in prboom-plus (and guess what it uses sdl_mixer); http://www.doomworld.com/vb/thread/50375/ . I put together an fpatches.zip patchset based on my experience; wasn't sure if anyone would like the set but they're here http://www.doomworld.com/idgames/?id=17195 . As a Linux user I'm someone who's had it with sdl_mixer's use of a really dated timidity and its now foobar'd fluidsynth soundfont backend (how can they add broken soundfont support? If they would just somehow integrate Timidity++ it would fix all these problems and be backwards compatible).

Last edited by Holering on 06-02-13 at 09:01

Old Post 06-01-13 12:24 #
Holering is offline Profile || Blog || PM || Search || Add Buddy IP || Edit/Delete || Quote
printz
CRAZY DUMB ZEALOT


Posts: 8885
Registered: 06-06


Is Timidity++ cross-platform (including Mac OS X)?

__________________
Automatic Wolfenstein - Version 1.0 - also on Android

Old Post 06-01-13 12:47 #
printz is offline Profile || Blog || PM || Homepage || Search || Add Buddy IP || Edit/Delete || Quote
Graf Zahl
Why don't I have a custom title by now?!


Posts: 7769
Registered: 01-03


Timidity++ is plain standard C code that shouldn't use any platform dependent stuff at all.

Old Post 06-01-13 14:56 #
Graf Zahl is online now Profile || Blog || PM || Email || Search || Add Buddy IP || Edit/Delete || Quote
exp(x)


Posts: 2595
Registered: 04-04



Graf Zahl said:
Timidity++ is plain standard C code that shouldn't use any platform dependent stuff at all.

Since when did C have functions for playing sound? I really doubt that there is no platform-dependent code.

Old Post 06-01-13 15:56 #
exp(x) is offline Profile || Blog || PM || Email || Search || Add Buddy IP || Edit/Delete || Quote
Quasar
Moderator


Posts: 6088
Registered: 08-00



exp(x) said:

Since when did C have functions for playing sound? I really doubt that there is no platform-dependent code.


It's possible to write sound processing and creation code that has no reference to system components or actual audio streams. Such libraries leave it to the embedding to stream their output into a device.

snes_spc is a perfect example; it emulates the behavior of SNES SPC700 sound hardware. All it does is hand you a buffer of the next samples to play and you play them however you're capable of doing it. You could write them to a .wav file, for example, instead.

Such libraries are the most portable and provide the most flexibility in use. I would call them the only really valuable sound libraries. Ones that try to do all that PLUS handle every platform-specific sound backend imaginable, inevitably end up doing a half-assed job at most of them.

Old Post 06-01-13 20:59 #
Quasar is online now Profile || Blog || PM || Email || Homepage || Search || Add Buddy IP || Edit/Delete || Quote
Csonicgo


Posts: 4450
Registered: 03-04



exp(x) said:

Since when did C have functions for playing sound? I really doubt that there is no platform-dependent code.



Maybe not endian-dependent, but there are platform-independent sound libraries out there. Few.

Old Post 06-03-13 01:07 #
Csonicgo is offline Profile || Blog || PM || Email || Homepage || Search || Add Buddy IP || Edit/Delete || Quote
exp(x)


Posts: 2595
Registered: 04-04


That makes sense. For some reason I thought that playing sound was more complicated than writing to a file. I should have known better.

Old Post 06-03-13 04:08 #
exp(x) is offline Profile || Blog || PM || Email || Search || Add Buddy IP || Edit/Delete || Quote
printz
CRAZY DUMB ZEALOT


Posts: 8885
Registered: 06-06



exp(x) said:
That makes sense. For some reason I thought that playing sound was more complicated than writing to a file. I should have known better.
I suppose from how you're saying that, that sending that generated information to the speakers is a trivial process… Is it up to the implementor to find out the API for each platform to play the sound? Does the standard C library have functions for playing sound, in the same way that it has for 'writing to a file'?

__________________
Automatic Wolfenstein - Version 1.0 - also on Android

Old Post 06-03-13 07:02 #
printz is offline Profile || Blog || PM || Homepage || Search || Add Buddy IP || Edit/Delete || Quote
Quasar
Moderator


Posts: 6088
Registered: 08-00



printz said:
I suppose from how you're saying that, that sending that generated information to the speakers is a trivial process… Is it up to the implementor to find out the API for each platform to play the sound? Does the standard C library have functions for playing sound, in the same way that it has for 'writing to a file'?

I think on Linux you can actually do that, by writing to a file handle opened on the audio device :P That's a pretty limited way to do audio though. I don't think any serious program or library does that, not directly at least.

Old Post 06-03-13 18:58 #
Quasar is online now Profile || Blog || PM || Email || Homepage || Search || Add Buddy IP || Edit/Delete || Quote
printz
CRAZY DUMB ZEALOT


Posts: 8885
Registered: 06-06


Lib SDL version 2.0 release candidate came out! http://www.libsdl.org/ I'd like to hear opinions on it. Do you have to change the code of your own program if you want to upgrade from SDL 1.2 to 2.0?

__________________
Automatic Wolfenstein - Version 1.0 - also on Android

Old Post 06-03-13 20:25 #
printz is offline Profile || Blog || PM || Homepage || Search || Add Buddy IP || Edit/Delete || Quote
Quasar
Moderator


Posts: 6088
Registered: 08-00



printz said:
Lib SDL version 2.0 release candidate came out! http://www.libsdl.org/ I'd like to hear opinions on it. Do you have to change the code of your own program if you want to upgrade from SDL 1.2 to 2.0?

It is neither ABI nor API compatible, or in other words, yes.

Old Post 06-03-13 21:26 #
Quasar is online now Profile || Blog || PM || Email || Homepage || Search || Add Buddy IP || Edit/Delete || Quote
wesleyjohnson
Senior Member


Posts: 1032
Registered: 04-09


There has to be more to the causes of the SDL_mixer complaints.
I have run SDL_mixer on Linux 2.4 for years without hearing any of these problems (Slackware, ALSA, Timidity).

I had problems with ALSA recognizing the built-in mixer on my motherboard. Had to create a special ALSA startup file to fix those settings. Things like that will mess with your sanity because it is hard to track down. What ALSA comes up with by default is close but the controls do not all work right.
Even when ALSA reports that that it configured for a sound card, you should test the ALSA mixer. It makes mistakes.
Getting an ALSA updated to the new sound card improves the sound card interface.

I have more problems with Timidity. I have had to modify the timidity installation to get it to work properly.

It is just as likely ALSA, or its interface to new sound cards, or windows changing some interface.
Should realize that SDL cannot interface directly to the sound card because ALSA owns it. ALSA provides repeater devices. Timidity also outputs through an ALSA repeater port.

Last edited by wesleyjohnson on 06-03-13 at 21:44

Old Post 06-03-13 21:38 #
wesleyjohnson is offline Profile || Blog || PM || Search || Add Buddy IP || Edit/Delete || Quote
andrewj
Senior Member


Posts: 1638
Registered: 04-02



Quasar said:

I think on Linux you can actually do that, by writing to a file handle opened on the audio device :P That's a pretty limited way to do audio though. I don't think any serious program or library does that, not directly at least.



Yep, you could open /dev/dsp and just write sound data to it (and hope the sample format and rate was the same). You could even have a program write the data to stdout, and pipe it to /dev/dsp to hear it, like: mysoundgen > /dev/dsp

Linux used to have OSS, the "Open Sound System", which was based on this idea, and you could control the format and sample rate with ioctl() calls. It was replaced by ALSA, the "Advanced Linux Sound Architecture", but OSS was trying to come back with OSS4 version, which I think is being used by one of the BSD operating systems (maybe NetBSD).

Old Post 06-04-13 04:02 #
andrewj is offline Profile || Blog || PM || Search || Add Buddy IP || Edit/Delete || Quote
All times are GMT. The time now is 23:26. Post New Thread    Post A Reply
Pages (3): [1] 2 3 »  
Doomworld Forums : Powered by vBulletin version 2.2.5 Doomworld Forums > Classic Doom > Source Ports > Officially had it with SDL

Show Printable Version | Email this Page | Subscribe to this Thread

 

Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is OFF
vB code is ON
Smilies are OFF
[IMG] code is ON
 

< Contact Us - Doomworld >

Powered by: vBulletin Version 2.2.5
Copyright ©2000, 2001, Jelsoft Enterprises Limited.