I’m having a weird problem with SDL_Mixer. I mentioned this before, but
here it is in more detail.
In essence, I wrote a really simple (~15 lines) test case which
initializes SDL_Mixer, loads an
.ogg file, and plays it. It works for one file (plays_ok.ogg) but fails
for the other (plays_bad.ogg).
Both ogg files are valid, they were both produced with oggenc, XMMS
plays them, and so on. They are made
from the same wav file, just encoded with different quality settings. By
"fails for the other" I mean that
the load time is ridiculously long (15 KB ogg file : 4 sec in an Athlon
XP 1800), and all I hear is either
a click or static.
You can find a zip file with the samples, source, Windows .EXE (this
works fine in Linux) and DLLs to test.
Both plays_ok and plays_bad play ok on Linux, plays_bad fails on my
Windows 2000 (CPU goes to 100% when trying to load the ogg file and
stays there until I kill via Ctrl-C).
I had similar behaviour with my application. I converted .au files
(yuck) with sox to ogg, and they play fine in Linux. Once I try it in
Windows they fail. Using the same SDL_Mixer version (compiled from
sources). Windows-SDL_Mixer works fine with the same files in .wav
format, though, so I guess my encoding produced some wired ogg files
SDL_mixer doesn’t want. But why it accepts it on Linux and not on
Windows I don’t know. The ogg.dll and vorbis.dll are present.
PeterAm Di, den 30.09.2003 schrieb Gabriel Gambetta um 20:29:
Even confirming this behavior will be very helpful.
Running WinXP Home, plays_ok.ogg is fine, plays_bad.ogg is not.
However, they both play perfectly in Winamp on the same machine.
Thus, it’s definately an SDL_mixer thing.
Could it be something to do with the way you open your audio stream? I
seem to remember having to load the sample, then open the audio stream
with setting to match that sample, then play it. However, it’s been a
while since I played with mixer.
HTH!
— Gabriel Gambetta wrote: > I’m having a
weird problem with SDL_Mixer. I mentioned this before,> but
here it is in more detail.
In essence, I wrote a really simple (~15 lines) test case which
initializes SDL_Mixer, loads an
.ogg file, and plays it. It works for one file (plays_ok.ogg) but
fails
for the other (plays_bad.ogg).
Both ogg files are valid, they were both produced with oggenc, XMMS
plays them, and so on. They are made
from the same wav file, just encoded with different quality settings.
By
"fails for the other" I mean that
the load time is ridiculously long (15 KB ogg file : 4 sec in an
Athlon
XP 1800), and all I hear is either
a click or static.
You can find a zip file with the samples, source, Windows .EXE (this
works fine in Linux) and DLLs to test.
Running WinXP Home, plays_ok.ogg is fine, plays_bad.ogg is not.
However, they both play perfectly in Winamp on the same machine.
Thus, it’s definately an SDL_mixer thing.
Are you all using a precompiled SDL_mixer/ogg/vorbis dll? I’m wondering
if perhaps it’s a bug fixed in the 1.0 vorbis libraries and you guys are
on RC3 or something.
Well, everyone confirmed the behavior so far. One OGG plays, the other
doesn’t, this doesn’t happen in Linux.
Could it be something to do with the way you open your audio stream?
I seem to remember having to load the sample,
then open the audio stream with setting to match that sample, then
play it. However, it’s been a while since I
played with mixer.
It shouldn’t, at least. I want to be able to load samples with different
formats. At worst, I want to be able to query the format of a sample and
convert it to a more likable format, but I didn’t find a way to do that
with SDL_Mixer.
Lic. Gabriel Gambetta
ARTech - GeneXus Development Team
ggambett at artech.com.uy
Are you all using a precompiled SDL_mixer/ogg/vorbis dll? I’m wondering
if perhaps it’s a bug fixed in the 1.0 vorbis libraries and you guys are
on RC3 or something.
I’m using the precompiled SDL_Mixer (1.2.5), downloaded from libsdl.org. As far as I know, it does include the OGG vorbis code, doesn’t it? Running strings on the dll seems to indicate so. I don’t explicitly include vorbisfile or ogg, should I?
Lic. Gabriel Gambetta
ARTech - GeneXus Development Team
ggambett at artech.com.uy> ----- Original Message -----
From: Ryan C. Gordon [mailto:icculus@icculus.org]
Sent: Mi?rcoles, 01 de Octubre de 2003 10:02 a.m.
To: sdl at libsdl.org
Subject: Re: [SDL] SDL_Mixer doesn’t like SOME oggs
Paul Smith wrote:
Running WinXP Home, plays_ok.ogg is fine, plays_bad.ogg is not.
However, they both play perfectly in Winamp on the same machine.
Thus, it’s definately an SDL_mixer thing.
Are you all using a precompiled SDL_mixer/ogg/vorbis dll? I’m wondering
if perhaps it’s a bug fixed in the 1.0 vorbis libraries and you guys are
on RC3 or something.
Running WinXP Home, plays_ok.ogg is fine, plays_bad.ogg is not.
However, they both play perfectly in Winamp on the same machine.
Thus, it’s definately an SDL_mixer thing.
Are you all using a precompiled SDL_mixer/ogg/vorbis dll? I’m wondering
if perhaps it’s a bug fixed in the 1.0 vorbis libraries and you guys are
on RC3 or something.
That’s probably it. I’ll look at grabbing the latest Ogg Vorbis libs.
See ya,
-Sam Lantinga, Software Engineer, Blizzard Entertainment
I can confirm that. I recompiled ogg/vorbis_static.lib and then
SDL_mixer, and my formerly broken ogg sound on Windows worked then with
the replaced SDL_Mixer.dll.
Thanks for providing this hint, I was despairing on that.
PeterAm Mi, den 01.10.2003 schrieb Sam Lantinga um 16:11:
Are you all using a precompiled SDL_mixer/ogg/vorbis dll? I’m wondering
if perhaps it’s a bug fixed in the 1.0 vorbis libraries and you guys are
on RC3 or something.
That’s probably it. I’ll look at grabbing the latest Ogg Vorbis libs.
Will the new DLL be made available in the libsdl page?
I’m in a cross-compile environment (Linux to Win32) and couldn’t figure
out how to build the DLLs
Lic. Gabriel Gambetta
ARTech - GeneXus Development Team
ggambett at artech.com.uy> ----- Original Message -----
From: Peter Strempel [mailto:zotan@web.de]
Sent: Jueves, 02 de Octubre de 2003 11:57 a.m.
To: sdl at libsdl.org
Subject: Re: [SDL] SDL_Mixer doesn’t like SOME oggs
Am Mi, den 01.10.2003 schrieb Sam Lantinga um 16:11:
Are you all using a precompiled SDL_mixer/ogg/vorbis dll? I’m
wondering
if perhaps it’s a bug fixed in the 1.0 vorbis libraries and you guys
are
on RC3 or something.
That’s probably it. I’ll look at grabbing the latest Ogg Vorbis libs.
I can confirm that. I recompiled ogg/vorbis_static.lib and then
SDL_mixer, and my formerly broken ogg sound on Windows worked then with
the replaced SDL_Mixer.dll.
Thanks for providing this hint, I was despairing on that.