The SDL forums have moved to discourse.libsdl.org.
This is just a read-only archive of the previous forums, to keep old links working.


SDL Forum Index
SDL
Simple Directmedia Layer Forums
can't open ogg: unrecognised file type
mal content
Guest

Hello.

Having a bit of trouble with SDL_mixer. For some reason, this file:

http://darklogik.org/tmp/sect1.ogg

(Ogg data, Vorbis audio, stereo, 44100 Hz, ~256006 bps, created by: Xiph.Org
libVorbis I (1.0))

md5: a61ddc4f6445134c8125558182908ff2

..will load fine on my OS X based G4, but not on my FreeBSD x86 desktop.

Mix_LoadWAV gives the following error:

``Unrecognized sound file type''

This is very strange. The file works correctly in other players such as
alsaplayer and Mplayer.

I'm not doing anything clever with the code:

normal_music = Mix_LoadWAV("sect1.ogg");
if (!normal_music) {
die_sdl("load_wav", Mix_GetError());
return 0;
}

Any help would be appreciated.
a1
can't open ogg: unrecognised file type
Mattias Karlsson
Guest

On Sat, 21 Jan 2006, mal content wrote:

Quote:
Hello.

Having a bit of trouble with SDL_mixer. For some reason, this file:

http://darklogik.org/tmp/sect1.ogg

(Ogg data, Vorbis audio, stereo, 44100 Hz, ~256006 bps, created by: Xiph.Org
libVorbis I (1.0))

md5: a61ddc4f6445134c8125558182908ff2

..will load fine on my OS X based G4, but not on my FreeBSD x86 desktop.

Mix_LoadWAV gives the following error:

``Unrecognized sound file type''

This is very strange. The file works correctly in other players such as
alsaplayer and Mplayer.

I'm not doing anything clever with the code:

normal_music = Mix_LoadWAV("sect1.ogg");
if (!normal_music) {
die_sdl("load_wav", Mix_GetError());
return 0;
}

My gut feeling is that SDL_mixer on your FreeBSD machine is not linked
against the ogg vorbis library.
can't open ogg: unrecognised file type
mal content
Guest

Quote:
My gut feeling is that SDL_mixer on your FreeBSD machine is not linked
against the ogg vorbis library.

Er, any way to check?

I installed SDL from ports and the ogg library was referenced, but that's
not a guarantee.
can't open ogg: unrecognised file type
Mattias Karlsson
Guest

On Sat, 21 Jan 2006, mal content wrote:

Quote:
Quote:
My gut feeling is that SDL_mixer on your FreeBSD machine is not linked
against the ogg vorbis library.

Er, any way to check?

'ldd' whould be my command of choice ;)

Quote:
I installed SDL from ports and the ogg library was referenced, but that's
not a guarantee.
can't open ogg: unrecognised file type
mal content
Guest

Quote:
'ldd' whould be my command of choice Wink

Well...

libSDL-1.1.so.7 => /usr/local/lib/libSDL-1.1.so.7 (0x2807f000)
libSDL_image.so.10 => /usr/local/lib/libSDL_image.so.10 (0x280e2000)
libSDL_mixer.so.2 => /usr/local/lib/libSDL_mixer.so.2 (0x280fd000)
libogg.so.5 => /usr/local/lib/libogg.so.5 (0x28144000)
libGL.so.1 => /usr/X11R6/lib/libGL.so.1 (0x28149000)
libGLU.so.1 => /usr/X11R6/lib/libGLU.so.1 (0x281b6000)
libpthread.so.2 => /usr/lib/libpthread.so.2 (0x28233000)
libc.so.6 => /lib/libc.so.6 (0x28258000)
libm.so.3 => /lib/libm.so.3 (0x2832f000)
libvgl.so.3 => /usr/lib/libvgl.so.3 (0x2834a000)
libX11.so.6 => /usr/X11R6/lib/libX11.so.6 (0x28352000)
libXext.so.6 => /usr/X11R6/lib/libXext.so.6 (0x28421000)
libvga.so.1 => /usr/local/lib/libvga.so.1 (0x28430000)
libaa.so.1 => /usr/local/lib/libaa.so.1 (0x2848d000)
libusbhid.so.1 => /usr/lib/libusbhid.so.1 (0x284a3000)
libjpeg.so.9 => /usr/local/lib/libjpeg.so.9 (0x284a7000)
libpng.so.5 => /usr/local/lib/libpng.so.5 (0x284c4000)
libz.so.2 => /lib/libz.so.2 (0x284ea000)
libtiff.so.4 => /usr/local/lib/libtiff.so.4 (0x284fb000)
libXxf86vm.so.1 => /usr/X11R6/lib/libXxf86vm.so.1 (0x2854c000)
libstdc++.so.4 => /usr/lib/libstdc++.so.4 (0x28552000)
libncurses.so.5 => /lib/libncurses.so.5 (0x2862f000)

Still, no joy...
can't open ogg: unrecognised file type
Mattias Karlsson
Guest

On Sat, 21 Jan 2006, mal content wrote:

Quote:
Quote:
'ldd' whould be my command of choice Wink

Well...

libSDL-1.1.so.7 => /usr/local/lib/libSDL-1.1.so.7 (0x2807f000)
libSDL_image.so.10 => /usr/local/lib/libSDL_image.so.10 (0x280e2000)
libSDL_mixer.so.2 => /usr/local/lib/libSDL_mixer.so.2 (0x280fd000)
libogg.so.5 => /usr/local/lib/libogg.so.5 (0x28144000)
libGL.so.1 => /usr/X11R6/lib/libGL.so.1 (0x28149000)
libGLU.so.1 => /usr/X11R6/lib/libGLU.so.1 (0x281b6000)
libpthread.so.2 => /usr/lib/libpthread.so.2 (0x28233000)
libc.so.6 => /lib/libc.so.6 (0x28258000)
libm.so.3 => /lib/libm.so.3 (0x2832f000)
libvgl.so.3 => /usr/lib/libvgl.so.3 (0x2834a000)
libX11.so.6 => /usr/X11R6/lib/libX11.so.6 (0x28352000)
libXext.so.6 => /usr/X11R6/lib/libXext.so.6 (0x28421000)
libvga.so.1 => /usr/local/lib/libvga.so.1 (0x28430000)
libaa.so.1 => /usr/local/lib/libaa.so.1 (0x2848d000)
libusbhid.so.1 => /usr/lib/libusbhid.so.1 (0x284a3000)
libjpeg.so.9 => /usr/local/lib/libjpeg.so.9 (0x284a7000)
libpng.so.5 => /usr/local/lib/libpng.so.5 (0x284c4000)
libz.so.2 => /lib/libz.so.2 (0x284ea000)
libtiff.so.4 => /usr/local/lib/libtiff.so.4 (0x284fb000)
libXxf86vm.so.1 => /usr/X11R6/lib/libXxf86vm.so.1 (0x2854c000)
libstdc++.so.4 => /usr/lib/libstdc++.so.4 (0x28552000)
libncurses.so.5 => /lib/libncurses.so.5 (0x2862f000)

Still, no joy...

Your exe is linked against the right libraries anyway, so I whould assume
that doing 'ldd /usr/local/lib/libSDL_mixer.so.2' whould also show a
libogg.so line like the above.

Then my best guess is grabbing the source for SDL_mixer, build a debug
version and try to locate why its not being recognized.
can't open ogg: unrecognised file type
mal content
Guest

Quote:
Your exe is linked against the right libraries anyway, so I whould assume
that doing 'ldd /usr/local/lib/libSDL_mixer.so.2' whould also show a
libogg.so line like the above.

Then my best guess is grabbing the source for SDL_mixer, build a debug
version and try to locate why its not being recognized.

Ah. I'll look sheepish and say that I forgot to try ldd on the library,
Ogg is NOT linked in:

$ ldd /usr/local/lib/libSDL_mixer.so.2
/usr/local/lib/libSDL_mixer.so.2:
libSDL-1.1.so.7 => /usr/local/lib/libSDL-1.1.so.7 (0x2819a000)
libm.so.3 => /lib/libm.so.3 (0x281fd000)
libvgl.so.3 => /usr/lib/libvgl.so.3 (0x28218000)
libX11.so.6 => /usr/X11R6/lib/libX11.so.6 (0x28220000)
libXext.so.6 => /usr/X11R6/lib/libXext.so.6 (0x282ef000)
libvga.so.1 => /usr/local/lib/libvga.so.1 (0x282fe000)
libaa.so.1 => /usr/local/lib/libaa.so.1 (0x2835b000)
libusbhid.so.1 => /usr/lib/libusbhid.so.1 (0x28371000)
libncurses.so.5 => /lib/libncurses.so.5 (0x28375000)

I'll ask the port maintainers to add the option of linking in Ogg support.

thanks!