My friend Pete just asked me:
i never played around with SDL’s sound capabilities. do you know if it’s
possible to use sound stuff without running X?
I was fairly sure it was, since I use plaympeg to play .mp3’s all the time,
and playwave a lot, too.
I switched to a console and, as I expected, SDL can do sound w/o being
under X.
However, I discovered a bug in plaympeg version 0.3.3. It requires you
to be under X (rather, have video capabilities), even if you’re playing
an mpeg file with no video stream.
I suggest calling the video initialization stuff only once the program
gets to an mpeg that has a video stream.
And then, if the display can’t be open (for example, you’re not in X ),
then report a warning and try to play the audio stream of the file, if
there is one.
So, under console, it’d be something like:
% plaympeg song.mpg movieclip.mpg animation.mpg
song.mpg: MPEG audio stream
movieclip.mpg: MPEG system stream (audio/video)
Video 320x240 resolution
Warning: No video devices available. Playing audio only.
animation.mpg: MPEG video stream
Video 320x240 resolution
Warning: No video devices available.
Warning: No audio stream detected. Skipping this MPEG.
%
I’d be happy to hack this into my hacked version of SMPEG/plaympeg 0.3.3
and send off a diff.
-bill!