[SDL] [Need help] Why this code crached?
Igor Mironchick
imironchick at gmail.com
Mon Jan 22 01:07:15 PST 2007
Thx for your reply.
2007/1/21, Mike Shal <marfey at gmail.com>:
>
> On 1/20/07, Igor Mironchick <imironchick at gmail.com> wrote:
> > 2007/1/20, Mike Shal <marfey at gmail.com>:
> > > 3) The check to see if SDL_BuildAudioCVT() doesn't work (at least in
> > > SDL1.2.7 - maybe this changed). The man page says it returns 1 on
> > > success and -1 on error, but it's checking for != 0 to determine an
> > > error condition.
> >
> > Where I can read about reasons of craches SDL_BuildAudioCVT()?
>
> I'm not sure where you could read about it - SDL_BuildAudioCVT() only
> crashed for me if SDL_OpenAudio() failed (which made everything 0 in
> m_dev_spec). Once I set m_desired_spec.channels, SDL_OpenAudio
> succeeded and SDL_BuildAudioCVT() didn't crash.
SDL_BuildAudioCVT() does not crash (if SDL_OpenAudio() does not fail). But
this function set cvt.needed flag!!! Which I does not verify. Now I solve
this problem and everething is Ok.
>
> > How I can play all types of WAV files?
>
> Not really sure what you mean here - if you're looking for other
> formats (like mp3, ogg, or whatever) you may want to look into some
> add-on libraries like SDL_Mixer. Anyway, here's your program with some
> changes (look for the /* MARF */ comments). This ran for me and played
> test.wav:
I mean only WAV, not ogg ro mp3... And after fixing usage of
SDL_BuildAudioCVT() all is Ok.
One more time thx for your reply. It realy help me.
--
Regards,
Igor Mironchick,
Intervale (c)
#ICQ 492-597-570
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.libsdl.org/pipermail/sdl-libsdl.org/attachments/20070122/ee75693f/attachment.html
More information about the SDL
mailing list