Allegro.cc - Online Community

Allegro.cc Forums » Game Design & Concepts » Selling Allegro Games/ AllegroMp3

This thread is locked; no one can reply to it. rss feed Print
Selling Allegro Games/ AllegroMp3
Dan Marshall
Member #5,442
January 2005

Hi guys--

I'm fairly sure that selling a game written with Allegro is legal, and yes, I would chip in back to the community should I make any cash from my efforts...

...however, what about if I use the Allegromp3 code in there as well -- is that legal? Anyone got any experience?!

Dan

HoHo
Member #4,534
April 2004
avatar

Have you read it's license? It should be written there

__________
In theory, there is no difference between theory and practice. But, in practice, there is - Jan L.A. van de Snepscheut
MMORPG's...Many Men Online Role Playing Girls - Radagar
"Is Java REALLY slower? Does STL really bloat your exes? Find out with your friendly host, HoHo, and his benchmarking machine!" - Jakub Wasilewski

Derezo
Member #1,666
April 2001
avatar

You'll need to pay a royalty to use the MP3 format.

I would suggest using Ogg Vorbis. There are a couple libraries that allow this with allegro, and you wont need to pay royalties to use the Ogg Vorbis file format.

Look into alogg.
Does DUMB support Ogg?

"He who controls the stuffing controls the Universe"

Dan Marshall
Member #5,442
January 2005

The license was long and wordy, and I am most definitely not a lawyer...! I got confused about what I can and can't do...!

Alogg sounds good, I'll look into it.

Ta.

EDIT: Just thinking, actually... if I can't use .mp3s because the format is copyrighted, that means I can't invite users to put their own .mp3 tracks in a folder and stream those in-game, doesn't it? Which means I'll have to use another format like .ogg

Here's my next questions: is it bad practice/ a major drain to simply use Allegro's SAMPLE code for music? This "register_sample_file_type" function looks exciting... does that work? Sorry -- this should most likely be in the Programming Forum now, shouldn't it?!

BAF
Member #2,981
December 2002
avatar

Why wouldn't register_sample_file_type work? AFAIK it works fine. And whats wrong with using allegro SAMPLEs for music?

Derezo
Member #1,666
April 2001
avatar

Quote:

I can't invite users to put their own .mp3 tracks in a folder and stream those in-game, doesn't it?

That would be fine. Royalties are needed if you distribute the file, but the decoder is perfectly legal to distribute.

If you wanted you could distribute with ogg and allow them to be replaced with mp3's.. or just allow mp3's through some other means.

"He who controls the stuffing controls the Universe"

Dan Marshall
Member #5,442
January 2005

I was hoping register_sample_file_type would work for music... just wasn't sure...! Will give it a bash this weekend...

Could I use it to pick up on .mp3s in a /music folder, convert and play them?

d

Sirocco
Member #88
April 2000
avatar

Quote:

Why wouldn't register_sample_file_type work? AFAIK it works fine. And whats wrong with using allegro SAMPLEs for music?

Well, uh... you could. What you'd end up with is essentially a module-style implementation where you slice your song into small snippets and lace them together as needed. If done properly you could save some space in memory, but you'd automatically lose the benefit of compression. There are ways around that...

So, why not simplify things and look into a module format like XM or IT? You could use the DUMB library to play them :)

-->
Graphic file formats used to fascinate me, but now I find them rather satanic.

Kitty Cat
Member #2,815
October 2002
avatar

Quote:

And whats wrong with using allegro SAMPLEs for music?

Music tends to be a few minutes in length. Uncompressed in a SAMPLE struct, that would be:
44100 (typcial frequency) * 120 (two minutes) * 2 (16-bit) * 2 (stereo) = 21,168,000 bytes (assuming I did my math right). A bit too much for practical uses, no? Plus, having to read and decode it all at once would take a fair bit orf time. That's why you use something like modules, or stream MP3/Vorbis.

--
"Do not meddle in the affairs of cats, for they are subtle and will pee on your computer." -- Bruce Graham

Pedro Avelar Gontijo
Member #5,372
January 2005
avatar

Derezo said:

If you wanted you could distribute with ogg and allow them to be replaced with mp3's.. or just allow mp3's through some other means.

Does that mean you can distribute .oggs along with a ogg-to-mp3 converter in a game which only supports .mp3's for free? ;)

----------
兩隻老虎,兩隻老虎,跑得快!

Tobias Dammers
Member #2,604
August 2002
avatar

No.
You can distribute freely:
- OGG files (provided the music itself isn't copyrighted)
- OGG encoders
- OGG decoders
- MP3 decoders
but not:
- MP3 files
- MP3 encoders

Since an OGG->MP3 recoder is also an MP3 encoder, you cannot distribute it freely. An MP3->OGG recoder would be fine, though.
So what you can do is build both an ogg and an mp3 decoder into your game, and leave the rest to the user. You can easily distribute ogg files with the game, what the users do with the mp3 support is their own business.

---
Me make music: Triofobie
---
"We need Tobias and his awesome trombone, too." - Johan Halmén

Go to: