Ok, I’ve got VidSlide compiled and running again. I configured smpeg
to use mixer ("./configure --enable-mixer").
However, when I run MPEGs with video and audio, the audio goes about
two times faster than it should.
When I run MPEGs with just audio (say, an MP3), the audio is just fine.
I’m using SDL 1.0.0, mixer 1.0.0 and smpeg 0.3.1.
First, I open the audio with:
Mix_OpenAudio(MIX_DEFAULT_FREQUENCY, MIX_DEFAULT_FORMAT,
MIX_DEFAULT_CHANNELS, 512)
Then, I load the MPEG:
mpeg = SMPEG_new(file, &info, 1);
I turn on audio and video:
SMPEG_enableaudio(mpeg, 1);
SMPEG_enablevideo(mpeg, 1);
I set the display with SMPEG_setdisplay(), then I start playing the MPEG:
SMPEG_play(mpeg);
Any ideas? Do I need to do anything different? I noticed the new
third argument to SMPEG_new(), “sdl_audio”. In smpeg.h, it says:
The sdl_audio parameter indicates if SMPEG should initialize the SDL audio
subsystem. If not, you will have to use the SMPEG_playaudio() function
below to extract the decoded data.
(Note: the function is actually called “SMPEG_playAudio()”, with a capital “A”)
Right now, like it says above, I’m just sending “1” in as the "sdl_audio"
argument.
(I looked at the source to “gtv”, and it does the same thing, and it plays
the MPEG in question fine*.)
From what the .h file says for this function (and SMPEG_wantedSpec and
SMPEG_actualSpec), I don’t really understand what I’m supposed to pass in
to any of these functions.
Thanks!
-bill!
-
- The MPEG in question also played fine when I was using SDL 0.11.2 and
the mixer from 0.11.2’s demos archive. Of course, --enable-mixer wasn’t
set, so I had those weird problems with mixer audio sometimes playing
and MPEG audio sometimes playing…
- The MPEG in question also played fine when I was using SDL 0.11.2 and