Sdl lock up on some mp3

We are running ubuntu 7.1(sdl 1.2.6) and ubuntu 8.04
We found 6 out of 2000 mp3 songs that lock up sdl mixer.
Mix_LoadMusic succeeds, Mix_PlayMusic succeeds, but no music is heard.
Furthermore, if you call Mix_HaltMusic or Mix_FreeMusic, it never returns. I suspect the file causes an early return which does not unlock the audio.

The music players that come with linux can play these songs no problem.
If anyone is interested, I can email you an mp3 that locks.

Any ideas?

Don W

Does this occur when using the playmus program that comes with the
SDL_mixer source code? Does the problem occur if you are using a dummy
audio driver? Which version and/or build of SDL_mixer and SMPEG are
you using? If you have not built from source, can you do so and tell
us if the problem still occurs?

Unless you have some kind of revelation in the intervening moments,
feel free to send me the guilty MP3s!

Thanks!On Tue, Dec 30, 2008 at 2:13 PM, Donald Weingarden wrote:

We are running ubuntu 7.1(sdl 1.2.6) and ubuntu 8.04
We found 6 out of 2000 mp3 songs that lock up sdl mixer.
Mix_LoadMusic succeeds, Mix_PlayMusic succeeds, but no music is heard.
Furthermore, if you call Mix_HaltMusic or Mix_FreeMusic, it never returns.
I suspect the file causes an early return which does not unlock the audio.

The music players that come with linux can play these songs no problem.
If anyone is interested, I can email you an mp3 that locks.

Any ideas?

Don W


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org


http://codebad.com/

Hi,

Last time i checked, MP3 playback was not working 100% in SDL_mixer.
If you are making a game, I would suggest using OGG format (Ogg Vorbis).

JeZ+Lee
SLNTHERO at aol.com
Silent Hero Productions ®
Video Game Design Studio
www.SilentHeroProductions.com

Donald Weingarden wrote:> We are running ubuntu 7.1(sdl 1.2.6) and ubuntu 8.04

We found 6 out of 2000 mp3 songs that lock up sdl mixer.
Mix_LoadMusic succeeds, Mix_PlayMusic succeeds, but no music is heard.
Furthermore, if you call Mix_HaltMusic or Mix_FreeMusic, it never
returns. I suspect the file causes an early return which does not
unlock the audio.

The music players that come with linux can play these songs no problem.
If anyone is interested, I can email you an mp3 that locks.

Any ideas?

Don W



SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

Oh that’s too bad, we’re making a juke box. I attached an mp3 to another
member, maybe this will help identify problems> ----- Original Message -----

From: slnthero@aol.com (Jesse Palser)
To: "A list for developers using the SDL library. (includes SDL-announce)"

Sent: Tuesday, December 30, 2008 2:32 PM
Subject: Re: [SDL] sdl lock up on some mp3

Hi,

Last time i checked, MP3 playback was not working 100% in SDL_mixer.
If you are making a game, I would suggest using OGG format (Ogg Vorbis).

JeZ+Lee
SLNTHERO at aol.com
Silent Hero Productions ®
Video Game Design Studio
www.SilentHeroProductions.com

Donald Weingarden wrote:

We are running ubuntu 7.1(sdl 1.2.6) and ubuntu 8.04 We found 6 out of
2000 mp3 songs that lock up sdl mixer. Mix_LoadMusic succeeds,
Mix_PlayMusic succeeds, but no music is heard.
Furthermore, if you call Mix_HaltMusic or Mix_FreeMusic, it never
returns. I suspect the file causes an early return which does not unlock
the audio.
The music players that come with linux can play these songs no problem.
If anyone is interested, I can email you an mp3 that locks. Any ideas?
Don W


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

Isn’t it a little silly to use SDL_mixer for a jukebox?On Tue, Dec 30, 2008 at 2:35 PM, Donald Weingarden wrote:

Oh that’s too bad, we’re making a juke box. I attached an mp3 to another
member, maybe this will help identify problems
----- Original Message ----- From: “Jesse P.”
To: "A list for developers using the SDL library. (includes SDL-announce)"

Sent: Tuesday, December 30, 2008 2:32 PM
Subject: Re: [SDL] sdl lock up on some mp3

Hi,

Last time i checked, MP3 playback was not working 100% in SDL_mixer.
If you are making a game, I would suggest using OGG format (Ogg Vorbis).

JeZ+Lee
SLNTHERO at aol.com
Silent Hero Productions ®
Video Game Design Studio
www.SilentHeroProductions.com

Donald Weingarden wrote:

We are running ubuntu 7.1(sdl 1.2.6) and ubuntu 8.04 We found 6 out of
2000 mp3 songs that lock up sdl mixer. Mix_LoadMusic succeeds, Mix_PlayMusic
succeeds, but no music is heard.
Furthermore, if you call Mix_HaltMusic or Mix_FreeMusic, it never
returns. I suspect the file causes an early return which does not unlock
the audio.
The music players that come with linux can play these songs no problem.
If anyone is interested, I can email you an mp3 that locks. Any ideas?
Don W


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org


http://codebad.com/

We’re already using it for graphics and for game sounds. We thought we’d
try it for our built in jukebox. We didn’t realize it wasn’t fully working.> ----- Original Message -----

From: donny.viszneki@gmail.com (Donny Viszneki)
To:
Sent: Tuesday, December 30, 2008 4:00 PM
Subject: Re: [SDL] sdl lock up on some mp3

Isn’t it a little silly to use SDL_mixer for a jukebox?

On Tue, Dec 30, 2008 at 2:35 PM, Donald Weingarden <@Donald_Weingarden> wrote:

Oh that’s too bad, we’re making a juke box. I attached an mp3 to another
member, maybe this will help identify problems
----- Original Message ----- From: “Jesse P.”
To: "A list for developers using the SDL library. (includes
SDL-announce)"

Sent: Tuesday, December 30, 2008 2:32 PM
Subject: Re: [SDL] sdl lock up on some mp3

Hi,

Last time i checked, MP3 playback was not working 100% in SDL_mixer.
If you are making a game, I would suggest using OGG format (Ogg Vorbis).

JeZ+Lee
SLNTHERO at aol.com
Silent Hero Productions ®
Video Game Design Studio
www.SilentHeroProductions.com

Donald Weingarden wrote:

We are running ubuntu 7.1(sdl 1.2.6) and ubuntu 8.04 We found 6 out of
2000 mp3 songs that lock up sdl mixer. Mix_LoadMusic succeeds,
Mix_PlayMusic
succeeds, but no music is heard.
Furthermore, if you call Mix_HaltMusic or Mix_FreeMusic, it never
returns. I suspect the file causes an early return which does not
unlock
the audio.
The music players that come with linux can play these songs no
problem.
If anyone is interested, I can email you an mp3 that locks. Any ideas?
Don W


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org


http://codebad.com/


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

I don’t know if it’s accurate to say it’s not "fully working."
Although I had no idea there were MP3s that would cause problems
(Jesse P, is that an SMPEG problem?) The reason I thought it was silly
to use SDL_mixer is because it’s a mixer which isn’t something most
jukeboxes/mediaplayers need ;)On Tue, Dec 30, 2008 at 4:49 PM, Donald Weingarden wrote:

We’re already using it for graphics and for game sounds. We thought we’d
try it for our built in jukebox. We didn’t realize it wasn’t fully working.
----- Original Message ----- From: “Donny Viszneki”
<@Donny_Viszneki>
To:
Sent: Tuesday, December 30, 2008 4:00 PM
Subject: Re: [SDL] sdl lock up on some mp3

Isn’t it a little silly to use SDL_mixer for a jukebox?

On Tue, Dec 30, 2008 at 2:35 PM, Donald Weingarden wrote:

Oh that’s too bad, we’re making a juke box. I attached an mp3 to another
member, maybe this will help identify problems
----- Original Message ----- From: “Jesse P.”
To: "A list for developers using the SDL library. (includes
SDL-announce)"

Sent: Tuesday, December 30, 2008 2:32 PM
Subject: Re: [SDL] sdl lock up on some mp3

Hi,

Last time i checked, MP3 playback was not working 100% in SDL_mixer.
If you are making a game, I would suggest using OGG format (Ogg Vorbis).

JeZ+Lee
SLNTHERO at aol.com
Silent Hero Productions ®
Video Game Design Studio
www.SilentHeroProductions.com

Donald Weingarden wrote:

We are running ubuntu 7.1(sdl 1.2.6) and ubuntu 8.04 We found 6 out of
2000 mp3 songs that lock up sdl mixer. Mix_LoadMusic succeeds,
Mix_PlayMusic
succeeds, but no music is heard.
Furthermore, if you call Mix_HaltMusic or Mix_FreeMusic, it never
returns. I suspect the file causes an early return which does not
unlock
the audio.
The music players that come with linux can play these songs no
problem.
If anyone is interested, I can email you an mp3 that locks. Any ideas?
Don W



SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org


http://codebad.com/


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org


http://codebad.com/

(1) It’s easier to play MP3s and other file formats using SDL_Mixer than
doing it yourself with straight SDL
(2) Sometimes you want to fade out one track and fade in another, or
mix in UI feedback sounds (clicks or beeps for on-screen buttons, etc.)

:wink:

-bill!On Tue, Dec 30, 2008 at 05:29:56PM -0500, Donny Viszneki wrote:

I don’t know if it’s accurate to say it’s not "fully working."
Although I had no idea there were MP3s that would cause problems
(Jesse P, is that an SMPEG problem?) The reason I thought it was silly
to use SDL_mixer is because it’s a mixer which isn’t something most
jukeboxes/mediaplayers need :wink:

I’ve never seen a media player/jukebox that was quite that much funOn Tue, Dec 30, 2008 at 5:43 PM, Bill Kendrick wrote:

UI feedback sounds (clicks or beeps for on-screen buttons, etc.)


http://codebad.com/

Hell, my littel Garmin GPS makes beeps when you push buttons, even when it’s
playing MP3s off of the SD card. (It also pauses and interrupts tracks to
give you navigation directions.
“o/~ Dum dee dum dum o/~ Turn left in 200 ft o/~ Dee dum dum o/~”)On Tue, Dec 30, 2008 at 06:10:47PM -0500, Donny Viszneki wrote:

On Tue, Dec 30, 2008 at 5:43 PM, Bill Kendrick <@Bill_Kendrick> wrote:

UI feedback sounds (clicks or beeps for on-screen buttons, etc.)

I’ve never seen a media player/jukebox that was quite that much fun


-bill!
“Tux Paint” - free children’s drawing software for Windows / Mac OS X / Linux!
Download it today! http://www.tuxpaint.org/

I forwarded one of the offending mp3 files. It is waiting for a moderator
to allow the email. Even if I switch to some other library, you’ll be able
to fix your problems.
If I get a chance to debug it I’ll report my findings. FYI the product is
NUCORE.> ----- Original Message -----

From: donny.viszneki@gmail.com (Donny Viszneki)
To: "A list for developers using the SDL library. (includes SDL-announce)"

Sent: Tuesday, December 30, 2008 5:29 PM
Subject: Re: [SDL] sdl lock up on some mp3

I don’t know if it’s accurate to say it’s not "fully working."
Although I had no idea there were MP3s that would cause problems
(Jesse P, is that an SMPEG problem?) The reason I thought it was silly
to use SDL_mixer is because it’s a mixer which isn’t something most
jukeboxes/mediaplayers need :wink:

On Tue, Dec 30, 2008 at 4:49 PM, Donald Weingarden <@Donald_Weingarden> wrote:

We’re already using it for graphics and for game sounds. We thought we’d
try it for our built in jukebox. We didn’t realize it wasn’t fully
working.
----- Original Message ----- From: “Donny Viszneki”
<donny.viszneki at gmail.com>
To:
Sent: Tuesday, December 30, 2008 4:00 PM
Subject: Re: [SDL] sdl lock up on some mp3

Isn’t it a little silly to use SDL_mixer for a jukebox?

On Tue, Dec 30, 2008 at 2:35 PM, Donald Weingarden <@Donald_Weingarden> wrote:

Oh that’s too bad, we’re making a juke box. I attached an mp3 to
another
member, maybe this will help identify problems
----- Original Message ----- From: “Jesse P.”
To: "A list for developers using the SDL library. (includes
SDL-announce)"

Sent: Tuesday, December 30, 2008 2:32 PM
Subject: Re: [SDL] sdl lock up on some mp3

Hi,

Last time i checked, MP3 playback was not working 100% in SDL_mixer.
If you are making a game, I would suggest using OGG format (Ogg
Vorbis).

JeZ+Lee
SLNTHERO at aol.com
Silent Hero Productions ®
Video Game Design Studio
www.SilentHeroProductions.com

Donald Weingarden wrote:

We are running ubuntu 7.1(sdl 1.2.6) and ubuntu 8.04 We found 6 out
of
2000 mp3 songs that lock up sdl mixer. Mix_LoadMusic succeeds,
Mix_PlayMusic
succeeds, but no music is heard.
Furthermore, if you call Mix_HaltMusic or Mix_FreeMusic, it never
returns. I suspect the file causes an early return which does not
unlock
the audio.
The music players that come with linux can play these songs no
problem.
If anyone is interested, I can email you an mp3 that locks. Any
ideas?
Don W



SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org


http://codebad.com/


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org


http://codebad.com/


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

Ah, I have used those! I think though that those touch screens have
legitimate usability-justified reasoning for the audio feedback. I’ve
never seen desktop software that beeped though… perhaps an XMMS
patch is needed to mend this situation…On Tue, Dec 30, 2008 at 7:15 PM, Bill Kendrick wrote:

On Tue, Dec 30, 2008 at 06:10:47PM -0500, Donny Viszneki wrote:

I’ve never seen a media player/jukebox that was quite that much fun

Hell, my littel Garmin GPS makes beeps when you push buttons


http://codebad.com/

Try Tux Paint. Use the Text tool. :wink:

(BTW, the old Atari 8-bit from the late 1970s-thru-1980s) had a feature
(on by default) where it’d ‘click’ as you typed, and it’d buzz when you got
close to the end of a logical line (120 chars, or ~3 physical lines))

-bill!On Tue, Dec 30, 2008 at 08:05:34PM -0500, Donny Viszneki wrote:

Ah, I have used those! I think though that those touch screens have
legitimate usability-justified reasoning for the audio feedback. I’ve
never seen desktop software that beeped though… perhaps an XMMS
patch is needed to mend this situation…

It can be downloaded at http://codebad.com/breaks-sdl-mixer.mp3On Tue, Dec 30, 2008 at 7:22 PM, Donald Weingarden wrote:

I forwarded one of the offending mp3 files. It is waiting for a moderator
to allow the email. Even if I switch to some other library, you’ll be able
to fix your problems.
If I get a chance to debug it I’ll report my findings. FYI the product is
NUCORE.


http://codebad.com/

I did some debugging and found the following:

The bug appears to be in SMPEG library.

  1. There are 2 threads, a read thread and a write thread. When it locks up,
    both of these threads are in sem_wait and ctrl - c does not stop the
    program. Adding printfs shows that nextwritebuffer is called over and over
    until all 16 are used, then it sticks in sem_wait. nextreadbuffer was
    called once during the 16 nextwritebuffers, then it is called one more time
    and it is stuck in sem_wait. If I add a check to insure a readbuffer is
    available otherwise return, the program never locks up, but still doesn’t
    play.

  2. The file I sent has 2 headers marked as layer 1 and the rest layer 3. If
    I hard code the layer to 3 in MPEGaudio::loadheader, it plays.
    I think the other players work because they assume layer 3 due to the
    mp3 file extension. The lock is probably due to trying to decode mp3 using
    the layer1 bitrate.

I’d like to discuss this with your SMPEG expert. Is there an SMPEG expert
in the house?> ----- Original Message -----

From: donny.viszneki@gmail.com (Donny Viszneki)
To: "A list for developers using the SDL library. (includes SDL-announce)"

Sent: Tuesday, December 30, 2008 9:56 PM
Subject: Re: [SDL] sdl lock up on some mp3

It can be downloaded at http://codebad.com/breaks-sdl-mixer.mp3

On Tue, Dec 30, 2008 at 7:22 PM, Donald Weingarden <@Donald_Weingarden> wrote:

I forwarded one of the offending mp3 files. It is waiting for a
moderator
to allow the email. Even if I switch to some other library, you’ll be
able
to fix your problems.
If I get a chance to debug it I’ll report my findings. FYI the product
is
NUCORE.


http://codebad.com/


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

I think Sam wrote SMPEG, didn’t he?On Sat, Jan 3, 2009 at 1:54 PM, Donald Weingarden wrote:

I did some debugging and found the following:

The bug appears to be in SMPEG library.

  1. There are 2 threads, a read thread and a write thread. When it locks up,
    both of these threads are in sem_wait and ctrl - c does not stop the
    program. Adding printfs shows that nextwritebuffer is called over and over
    until all 16 are used, then it sticks in sem_wait. nextreadbuffer was
    called once during the 16 nextwritebuffers, then it is called one more time
    and it is stuck in sem_wait. If I add a check to insure a readbuffer is
    available otherwise return, the program never locks up, but still doesn’t
    play.

  2. The file I sent has 2 headers marked as layer 1 and the rest layer 3. If
    I hard code the layer to 3 in MPEGaudio::loadheader, it plays.
    I think the other players work because they assume layer 3 due to the mp3
    file extension. The lock is probably due to trying to decode mp3 using the
    layer1 bitrate.

I’d like to discuss this with your SMPEG expert. Is there an SMPEG expert
in the house?

----- Original Message ----- From: “Donny Viszneki”
<@Donny_Viszneki>
To: "A list for developers using the SDL library. (includes SDL-announce)"

Sent: Tuesday, December 30, 2008 9:56 PM
Subject: Re: [SDL] sdl lock up on some mp3

It can be downloaded at http://codebad.com/breaks-sdl-mixer.mp3

On Tue, Dec 30, 2008 at 7:22 PM, Donald Weingarden wrote:

I forwarded one of the offending mp3 files. It is waiting for a
moderator
to allow the email. Even if I switch to some other library, you’ll be
able
to fix your problems.
If I get a chance to debug it I’ll report my findings. FYI the product
is
NUCORE.


http://codebad.com/


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org


http://codebad.com/

what’s the best way to contact sam? I’d contact him directly if no one else
is interested.> ----- Original Message -----

From: donny.viszneki@gmail.com (Donny Viszneki)
To: "A list for developers using the SDL library. (includes SDL-announce)"

Sent: Saturday, January 03, 2009 2:45 PM
Subject: Re: [SDL] sdl lock up on some mp3

I think Sam wrote SMPEG, didn’t he?

On Sat, Jan 3, 2009 at 1:54 PM, Donald Weingarden <@Donald_Weingarden> wrote:

I did some debugging and found the following:

The bug appears to be in SMPEG library.

  1. There are 2 threads, a read thread and a write thread. When it locks
    up,
    both of these threads are in sem_wait and ctrl - c does not stop the
    program. Adding printfs shows that nextwritebuffer is called over and
    over
    until all 16 are used, then it sticks in sem_wait. nextreadbuffer was
    called once during the 16 nextwritebuffers, then it is called one more
    time
    and it is stuck in sem_wait. If I add a check to insure a readbuffer is
    available otherwise return, the program never locks up, but still doesn’t
    play.

  2. The file I sent has 2 headers marked as layer 1 and the rest layer 3.
    If
    I hard code the layer to 3 in MPEGaudio::loadheader, it plays.
    I think the other players work because they assume layer 3 due to the
    mp3
    file extension. The lock is probably due to trying to decode mp3 using
    the
    layer1 bitrate.

I’d like to discuss this with your SMPEG expert. Is there an SMPEG
expert
in the house?

----- Original Message ----- From: “Donny Viszneki”
<donny.viszneki at gmail.com>
To: "A list for developers using the SDL library. (includes
SDL-announce)"

Sent: Tuesday, December 30, 2008 9:56 PM
Subject: Re: [SDL] sdl lock up on some mp3

It can be downloaded at http://codebad.com/breaks-sdl-mixer.mp3

On Tue, Dec 30, 2008 at 7:22 PM, Donald Weingarden <@Donald_Weingarden> wrote:

I forwarded one of the offending mp3 files. It is waiting for a
moderator
to allow the email. Even if I switch to some other library, you’ll be
able
to fix your problems.
If I get a chance to debug it I’ll report my findings. FYI the product
is
NUCORE.


http://codebad.com/


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org


http://codebad.com/


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

Check the archives. His email address is attached to all his posts to this list.>----- Original Message ----

From: Donald Weingarden
Subject: Re: [SDL] sdl lock up on some mp3

what’s the best way to contact sam? I’d contact him directly if no one else is interested.

I did some debugging and found the following:

The bug appears to be in SMPEG library.

I’d like to discuss this with your SMPEG expert. Is there an SMPEG expert
in the house?

I’m not an expert, but I’m probably the closest around.

See ya,
-Sam Lantinga, Founder and President, Galaxy Gameworks LLC