SDL_mixer and ogg

Why I can play ogg files for music but I cannot do it for sounds?

Why I can play ogg files for music but I cannot do it for sounds?

Limitation of the current SDL_mixer system: things that need to be
"streamed" like an ogg or mp3 are considered “music”, whereas things that
are capable of being stored as a fully decoded waveform in memory are
regular sounds.

It’s a crappy limitation, and we’ll be removing it in the rewrite.

–ryan.

Because only Mix_LoadMUS(…) can load file formats which
are not WAV.
In my opinion, sounds channels are designed to play short
sounds like a laser beam sound or a “knock” at the door
sound. And WAV format is quite indicated for this type of
sound event (not compressed, fast to launch and read).
Music channel may be used for background sound or
background music which are usualy long sample and which
often require compression such as OGG or MP3.

but you can still convert your OGG sound into WAV with a
sound editor :stuck_out_tongue_winking_eye:

regards

Why I can play ogg files for music but I cannot do it
for sounds?> Subject : [SDL] SDL_mixer and ogg


Profitez des 2 offres exceptionnelles Tiscali !
“Internet Gratuit le Jour” et "Modem ADSL rembours?"
Cliquez ici, http://register.tiscali.fr/forfaits_ls/
Offres soumises ? conditions.

Hello All,

Does any body work with ParaGUI (window add-on for SDL)?
When I have 24 bpp screen surface, I cannot print text on it
, when I have 16 bpp - it prints.

What`s wrong?

Thank you!

Best regards,
Alexander mailto:Editor at echo.ru

but you can still convert your OGG sound into WAV with a
sound editor :stuck_out_tongue_winking_eye:

But there’s really no reason to do so, especially if you want to ship an
ogg instead of a WAV due to bandwidth/disk space concerns. The SDL_mixer
rewrite will allow you to use any supported format in either way. If you
want to use an OGG for a quick sound effect, and are concerned about the
resources required to decode one on the fly, the option will be available
to predecode it so that the raw waveform is available for multiple
playbacks. Alternately, the mixer will decode what it needs on the fly.

Part of the goal is to remove the distinction between “music” and
"sounds". They will be interchangable, and if the distinction remains at
all, it will be for backwards compatibility.

–ryan.

[…]

but you can still convert your OGG sound into WAV with a
sound editor :stuck_out_tongue_winking_eye:

Well, quite a few games seem to use uncompressed WAV even for the music,
so that’s not too far off, really.

Meanwhile, even tracker modules are gigantic compared to the music used
in the upcoming Kobo Deluxe release. :slight_smile:

//David Olofson — Programmer, Reologica Instruments AB

.- M A I A -------------------------------------------------.
| Multimedia Application Integration Architecture |
| A Free/Open Source Plugin API for Professional Multimedia |
----------------------------> http://www.linuxdj.com/maia -' .- David Olofson -------------------------------------------. | Audio Hacker - Open Source Advocate - Singer - Songwriter |-------------------------------------> http://olofson.net -'On Thursday 23 May 2002 17:23, Marc Le Glanaer wrote:

This is slightly OT, but I have to ask…

What music format makes Tracker modules seem gigantic. The only format that
comes close is MIDI and that’s because MIDI doesn’t store sound info.

I’m not doubting you, I’m just very interested.

Cheers

JasonOn Thursday 23 May 2002 9:20 pm, David Olofson wrote:

On Thursday 23 May 2002 17:23, Marc Le Glanaer wrote:
[…]

but you can still convert your OGG sound into WAV with a
sound editor :stuck_out_tongue_winking_eye:

Well, quite a few games seem to use uncompressed WAV even for the music,
so that’s not too far off, really.

Meanwhile, even tracker modules are gigantic compared to the music used
in the upcoming Kobo Deluxe release. :slight_smile:

//David Olofson — Programmer, Reologica Instruments AB

.- M A I A -------------------------------------------------.

| Multimedia Application Integration Architecture |
| A Free/Open Source Plugin API for Professional Multimedia |

`----------------------------> http://www.linuxdj.com/maia -’
.- David Olofson -------------------------------------------.

| Audio Hacker - Open Source Advocate - Singer - Songwriter |

`-------------------------------------> http://olofson.net -’


SDL mailing list
SDL at libsdl.org
http://www.libsdl.org/mailman/listinfo/sdl

Well, MIDI is pretty close, since I’m using MIDI files for the music
data. However, the interesting part is how the instruments are stored:
I’m using a simple scripting language to render sounds at load time. The
scripts are usually just a few hundred bytes each. Besides, scripts
(mostly keywords and numbers) and MIDI files compress rather well. :slight_smile:

//David Olofson — Programmer, Reologica Instruments AB

.- M A I A -------------------------------------------------.
| Multimedia Application Integration Architecture |
| A Free/Open Source Plugin API for Professional Multimedia |
----------------------------> http://www.linuxdj.com/maia -' .- David Olofson -------------------------------------------. | Audio Hacker - Open Source Advocate - Singer - Songwriter |-------------------------------------> http://olofson.net -'On Friday 24 May 2002 02:49, Jason Farmer wrote:

This is slightly OT, but I have to ask…

What music format makes Tracker modules seem gigantic. The only format
that comes close is MIDI and that’s because MIDI doesn’t store sound
info.

My brother is a musician/sound guy, and he
said that he’d love to write some music for my game. We want to do it in a
dynamic sort of way, with different music clips being automatically selected
depending on game state. So suddenly, this comment that I read a few days
ago became very interesting to me. :slight_smile:

How theoretical is this rewrite? What sort of timeframe does it have?
Because that sounds like just exactly what I want.On Thu, May 23, 2002 at 10:30:31AM -0400, Ryan C. Gordon wrote:

Limitation of the current SDL_mixer system: things that need to be
"streamed" like an ogg or mp3 are considered “music”, whereas things that
are capable of being stored as a fully decoded waveform in memory are
regular sounds.
It’s a crappy limitation, and we’ll be removing it in the rewrite.


Matthew Miller @Matthew_Miller http://www.mattdm.org/
Boston University Linux ------> http://linux.bu.edu/

How theoretical is this rewrite? What sort of timeframe does it have?
Because that sounds like just exactly what I want.

It’s getting close, honestly, but I can’t commit to a timeframe until I
finish up some contracts I’m working on.

SDL_sound needs to hit a 1.0 release (since it will be used for the
rewrite), so if you want to help, come help us polish off the last couple
things on the TODO list.

–ryan.

If you’re willing to work with mods, I made a slim change to sdl_mixer
to add the ability to set the next “pattern” dynamically in a mod file (so it
doesn’t have to just loop). We use it to generate dynamic music where
the mood changes as the game proceeds. Fair warning: creating the mods
is a royal pain.

The change is specific to mods, and I didn’t feel it fit the spirit
of the general-purpose API in sdl_mixer, which is why I haven’t
offered it as a general patch. But if you want the code, you’re
welcome to it (I’ll be posting it for general download before we
distribute the game, but haven’t quite gotten there yet). Just send me
a personal email (off list) if you want it.

 Kent

Thursday, May 30, 2002, 8:02:44 PM, you wrote:

MM> On Thu, May 23, 2002 at 10:30:31AM -0400, Ryan C. Gordon wrote:

Limitation of the current SDL_mixer system: things that need to be
"streamed" like an ogg or mp3 are considered “music”, whereas things that
are capable of being stored as a fully decoded waveform in memory are
regular sounds.
It’s a crappy limitation, and we’ll be removing it in the rewrite.

MM> My brother is a musician/sound guy, and he
MM> said that he’d love to write some music for my game. We want to do it in a
MM> dynamic sort of way, with different music clips being automatically selected
MM> depending on game state. So suddenly, this comment that I read a few days
MM> ago became very interesting to me. :slight_smile:

MM> How theoretical is this rewrite? What sort of timeframe does it have?
MM> Because that sounds like just exactly what I want.–
Kent Quirk, CTO, CogniToy
@Kent_Quirk
http://www.cognitoy.com

It’s getting close, honestly, but I can’t commit to a timeframe until I
finish up some contracts I’m working on.

Obviously no need for a commentment. I wasn’t planning on paying you
anything. :slight_smile:

SDL_sound needs to hit a 1.0 release (since it will be used for the
rewrite), so if you want to help, come help us polish off the last couple
things on the TODO list.

I’ll take a look. I can definitely test, and I can write man pages if
pressed.On Thu, May 30, 2002 at 09:10:14PM -0400, Ryan C. Gordon wrote:


Matthew Miller @Matthew_Miller http://www.mattdm.org/
Boston University Linux ------> http://linux.bu.edu/

Ryan C. Gordon wrote:

SDL_sound needs to hit a 1.0 release (since it will be used for the
rewrite), so if you want to help, come help us polish off the last couple
things on the TODO list.

–ryan.

if libmad support is added, mp3’s can play in ps2 games that use SDL_sound…
any chance of this happening?–
-==-
Jon Atkins
http://jcatki.2y.net/

if libmad support is added, mp3’s can play in ps2 games that use SDL_sound…
any chance of this happening?

No chance by default: libmad is GPL’d, not LGPL’d, so we can’t link
against it. I’m not going begging for a license exception. SDL_sound has
an integer-based decoder for MP3s built in already, which I presume will
work on the PlayStation2 Linux kit.

–ryan.

I want to use ogg for music and I use SDL_mixer to play. I have compiled
and run the program under Windows 2K. The SDL_mixer docs state that the
ogg libraries are needed but the file is played without them. Is the ogg
support statically linked (Win32 dev edition)?

Yes, it is. Grep for “ogg” in the DLL.

Lic. Gabriel Gambetta
ARTech - GeneXus Development Team
ggambett at artech.com.uy