Dark Bit Factory & Gravity

PROGRAMMING => Freebasic => Topic started by: Shockwave on July 16, 2007

Title: SDL question
Post by: Shockwave on July 16, 2007
I am thinking of using SDL to make a project.
I understand that SDL allows playback of MP3 sound?

Can SDL be used to extract sound level information while an MP3 is playing?
Also I understand that it supports blitting to the screen. Does it support 24 bit PNG graphics?

It is essential that I am able to incorporate these things into my project so I would be grateful for any thoughts before I plunge in!

Is there a better lib?

Should I use Bassmod and some other PNG lib instead?

It is not important to resource all the files into the exe this time.

Thanks.
Title: Re: SDL question
Post by: Jim on July 17, 2007
I don't know much about SDL, but the only thing in your list you don't already have is the ability to get the volume level of an mp3 file that's playing.  Other than that, you can use mci for mp3 (2 lines of code), your favourite sound lib, libpng, ptc.

Jim
Title: Re: SDL question
Post by: Dr_D on July 17, 2007
Yetifoot made a really nice and compact png lib. That's what I've been using since I discovered it. If you can't find it, just holler. About mp3, I'm not sure. FBSound plays mp3 files, but it has no 3d support yet. You can use FMOD, if you're doing a freeware project. ;)
Title: Re: SDL question
Post by: Shockwave on July 17, 2007
Thanks :) K+ Both of you.

Hopefully I will be able to get the png lib to work with tinyptc.
Title: Re: SDL question
Post by: Emil_halim on July 17, 2007

my best and dear friend shocky. :)

Just I am wonder , why he still concentrate  all the time on software rendering stuff  and you do always ignore directX. I know you have a laptop which has no much hardware acceleration , but even if so DirectX still offer you a lot.

So my best advice for you to use DirectX or using OpeGL.

By the way if you want me to make some simple functions such as my OgreMagic for you , I will do it for you.
Title: Re: SDL question
Post by: Shockwave on July 17, 2007
Thank you for the warm post Emil :) K+

I love software rendering, I think I will carry on doing the same stuff for as long as I can in some capacity, but you are right.

I am perhaps too stubborn, how about this, I will do some Opengl stuff in the next few weeks, even if it's only some simple textured cubes.

I'll post what I do so that other people can see how bad it it! :D
Title: Re: SDL question
Post by: Stonemonkey on July 17, 2007
Heh, I'm kind of the same although I have messed around a bit with opengl I keep going back to software stuff. Doing either though I find I can take something I've learned and apply it to the other.
Title: Re: SDL question
Post by: benny! on July 18, 2007
@Shocky:

Besides, if you start doing coding using SDL why not try using it with C/C++. Once
installed and configured in Visual Express I guess it would be a good start to do some-
thing in C/C++. And with SDL you don't have to care about of lot of stuff which might
appear complicated on the first sight.
Title: Re: SDL question
Post by: Shockwave on July 18, 2007
That's a good question indeed Benny and the answer is, no reason why not :)

The reason for this is because I was approached to code a project that needs to use 24 bit png gfx and mp3's

As long as I can do those things I don't really mind what language and API I use for it. It's still a little way off as I have to finish this intro for S!P first but all the info posted is very helpful, thank you all :)