Author Topic: SDL question  (Read 4190 times)

0 Members and 1 Guest are viewing this topic.

Offline Shockwave

  • good/evil
  • Founder Member
  • DBF Aficionado
  • ********
  • Posts: 17409
  • Karma: 498
  • evil/good
    • View Profile
    • My Homepage
SDL question
« 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.
Shockwave ^ Codigos
Challenge Trophies Won:

Offline Jim

  • Founder Member
  • DBF Aficionado
  • ********
  • Posts: 5301
  • Karma: 402
    • View Profile
Re: SDL question
« Reply #1 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
Challenge Trophies Won:

Offline Dr_D

  • Atari ST
  • ***
  • Posts: 151
  • Karma: 29
    • View Profile
Re: SDL question
« Reply #2 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. ;)
The Dr. is INsane!!!

Offline Shockwave

  • good/evil
  • Founder Member
  • DBF Aficionado
  • ********
  • Posts: 17409
  • Karma: 498
  • evil/good
    • View Profile
    • My Homepage
Re: SDL question
« Reply #3 on: July 17, 2007 »
Thanks :) K+ Both of you.

Hopefully I will be able to get the png lib to work with tinyptc.
Shockwave ^ Codigos
Challenge Trophies Won:

Offline Emil_halim

  • Atari ST
  • ***
  • Posts: 248
  • Karma: 21
    • View Profile
    • OgreMagic Library
Re: SDL question
« Reply #4 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.

Offline Shockwave

  • good/evil
  • Founder Member
  • DBF Aficionado
  • ********
  • Posts: 17409
  • Karma: 498
  • evil/good
    • View Profile
    • My Homepage
Re: SDL question
« Reply #5 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
Shockwave ^ Codigos
Challenge Trophies Won:

Offline Stonemonkey

  • Pentium
  • *****
  • Posts: 1315
  • Karma: 96
    • View Profile
Re: SDL question
« Reply #6 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.

Offline benny!

  • Senior Member
  • DBF Aficionado
  • ********
  • Posts: 4384
  • Karma: 228
  • in this place forever!
    • View Profile
    • bennyschuetz.com - mycroBlog
Re: SDL question
« Reply #7 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.
[ mycroBLOG - POUET :: whatever keeps us longing - for another breath of air - is getting rare ]

Challenge Trophies Won:

Offline Shockwave

  • good/evil
  • Founder Member
  • DBF Aficionado
  • ********
  • Posts: 17409
  • Karma: 498
  • evil/good
    • View Profile
    • My Homepage
Re: SDL question
« Reply #8 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 :)
Shockwave ^ Codigos
Challenge Trophies Won: