[SDL] SDL test program, no sound and no error either
Albert Zeyer
albert.zeyer at rwth-aachen.de
Sun Mar 9 11:28:30 PDT 2008
Am Sonntag, den 09.03.2008, 18:04 +0000 schrieb Daniel Grace:
> On Sat, Mar 8, 2008 at 11:14 PM, Albert Zeyer
> <albert.zeyer at rwth-aachen.de> wrote:
> >
> > Am Samstag, den 08.03.2008, 14:47 +0000 schrieb Daniel Grace:
> > > On Fri, Mar 7, 2008 at 4:37 PM, Albert Zeyer
> > > <albert.zeyer at rwth-aachen.de> wrote:
> >
> > > My app is made from those snippets.
> > > > Or have you used the SDL PlaySound.zip on the site?
> > > No.
> > And...? Does this work?
>
> My app is the same.
>
> > Mixer for alsa. Just post the output...
> >
>
> OK, here it is:
>
> tux ~ # amixer
> [...]
> Simple mixer control 'Master Surround',0
> Capabilities: pvolume pswitch
> Playback channels: Front Left - Front Right
> Limits: Playback 0 - 31
> Mono:
> Front Left: Playback 0 [0%] [-46.50dB] [off]
> Front Right: Playback 0 [0%] [-46.50dB] [off]
> [...]
> Front Left: Playback 0 [0%] [-34.50dB] [off] Capture [off]
> Front Right: Playback 0 [0%] [-34.50dB] [off] Capture [off]
> [...]
A lot of the channels are muted or at volume 0%, including some surround
channels. It's possible that the ALSA implementation of SDL uses these
channels.
Unmute them. (Just for testing unmute everything.)
> > > > How long is the app running? Does it quit immediatly or does it run
> > > > exactly as long as the sound?
> > > I think the app quits immediately.
> > What do you mean with "I think"? Try it out.
>
> Yes, the app flickers it does not last, so the sound file seems to be ignored.
>
How long does the app run? 'Immediatly returning' really means that you
don't really recognise any runtime.
The soundfile itself is also not that long.
Use 'time ./yourapp'.
> > > > Post the output of the app.
> > >
> > > There is none, it just says "press a key..." when it has finished.
> > >
> >
> > I don't see any code in the sample which could produce this output.
> >
> > Are you starting the app normally in a console?
>
> Yes, I start it as you told me:
> SDL_AUDIODRIVER=alsa ./sdlmixtest
>
Why are you getting this output?
Which terminal are you using?
> >
> > Perhaps put further debug messages into to see if they got printed.
>
> I'm not sure that would help, the app runs to the end.
>
How do you know that if no message occurs?
('Press any key' does not belong to your app. Or have you added this?)
> > Just try a bit around... Don't wait that we ask you always for all small
> > details.
> >
> > Perhaps also try to enable the current disabled features, perhaps SDL
> > behaves a bit different (buggy) without them. I would at least test to
> > enable OSS-support (even if you don't want to use it later).
> >
>
> I enabled oss in ufed and then I remerged sdl-mixer and libsdl.
> Do I need to emerge world now ?
No, that's already enough. (Though I am not sure if you have the
ALSA-OSS layer correctly installed in the kernel.)
Is there any difference if you use this now:
SDL_AUDIODRIVER=oss ./yourapp
(But as I mentioned, this is only for testing. You should try to get it
working with ALSA, OSS is deprecated.)
More information about the SDL
mailing list