Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

First encounter music (MP3 support) #35

Open
DanielGibson opened this issue Apr 20, 2016 · 17 comments
Open

First encounter music (MP3 support) #35

DanielGibson opened this issue Apr 20, 2016 · 17 comments

Comments

@DanielGibson
Copy link

TFE uses MP3 for music, unlike TSE which uses .ogg and is happy to use libogg and libvorbis.

It only works if an appropriate libamp11lib.so is available.
For 32bit Linux the one from icculus' original Linuxport work, for 64bit Linux not, obviously (and neither for other platforms like OSX or FreeBSD).

I just found the original source on archive.org: https://web.archive.org/web/20060203121222/http://marvin.cc.fer.hr/~elf/amp11lib/

I created a github repo with the source: https://github.com/DanielGibson/amp11lib

I haven't tried to build the source yet and I have no idea if it's 64bit-clean, but at least it's not lost anymore :-)

@ericwomer
Copy link

ericwomer commented Apr 20, 2016

You know the audio files in the gro's from steam have ogg and not mp3 for TFE?

EDIT
But they do have .wav files for sound.

@DanielGibson
Copy link
Author

no I don't, I have the CD version

@ericwomer
Copy link

Why not put amp11lib under External/ in SeriousSam
and have a option(... to build it or not depending on weather or not the user is using the CD version or Steam version.

@Yamagi
Copy link

Yamagi commented Apr 21, 2016

A very, very hacky port of the libamp source to modern FreeBSD and maybe Linux can be found here: https://github.com/Yamagi/amp11lib/tree/cleanup Yes, it's dirty and should be done right. And yes, it may eat your dog. ;)

@Yamagi
Copy link

Yamagi commented Apr 21, 2016

And Daniel just merged it into his branch.

@DanielGibson
Copy link
Author

after very minor fixes it works on Linux, too (tested 64bit). just build it and copy the resulting libamp11lib.so into your serious-sam-tfe/Bin/ dir, ssam-tfe then should be able to find and use it to play the mp3 music

@icculus
Copy link
Owner

icculus commented Apr 21, 2016

CC @SLAwww, just making sure having the source to amp11lib in revision control doesn't cause problems for Croteam (I assume it was MP3 patent concerns that had it removed before...?)

--ryan.

@DanielGibson
Copy link
Author

IANAL, but afaik distributing source code that violates mpeg patents is fine (that's what the x264 project does).
With binaries it might be different, but there might be a difference between libs and programs there, as libs alone can't do anything? Absolutely unsure about that detail, though.

Even Debian (which is pretty anal about licenses) has been distributing mp3 decoders (as binary) since forever, and even encoders (lame, even in the "main" section, not only "non-free" or contrib) for several years, so I think it's safe :-)

@SLAwww
Copy link

SLAwww commented Apr 21, 2016

Amp11lib was removed from commercial game version long time ago. Since the engine is open-source now, I suppose you are free to use any code under GPL. And if it was already done as @DanielGibson said, then why not?

@icculus
Copy link
Owner

icculus commented Apr 21, 2016

ok, it's cool with me then, too.

@DanielGibson
Copy link
Author

Cool, thanks! :-)

(I still have the original Serious Sam cardbord box.. the big US version :-)
So I like having MP3 support so I can continue to use the game data from that came with it)

@ericwomer
Copy link

@SLAwww could you possibly make a patch to supply them with the .ogg/vorbis files instead of using the mp3 files?

@ericwomer
Copy link

And yeah I forgot about licensing issues having a third party lib in this repo, even if they were the ones to create it.

@icculus
Copy link
Owner

icculus commented Apr 22, 2016

even if they were the ones to create it.

Strictly speaking, I think Alen wrote it externally and it was convenient to grab when Serious Engine needed it.

amp11lib is LGPL'd, it should be okay to include here. We are always going to build it as a shared library that the engine wants to dlopen() anyhow, so I don't think there's a licensing concern.

@ptitSeb
Copy link

ptitSeb commented Apr 23, 2016

Where can I find the sources of this lib?
I only find this link: http://marvin.cc.fer.hr/~elf/amp11lib/ but I cannot access it (site must be down now, or something similar).

@DanielGibson
Copy link
Author

@ptitSeb
Copy link

ptitSeb commented Apr 24, 2016

Ah, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants