Re: Next release

2012-08-24 Thread email

Hi pals!

In the last time we did, in my opinion, a big mistake. In test scripts  
we checked for libpng like: SDL::Config-has('png'). But this didnt  
ever returned true, Simply because the HAVE_PNG was only set when  
actually building that lib in SDL. (Note: not Alien::SDL)
This -has() method works pretty fine for stuff like SDL_gfx, since it  
will return true if we found SDL_gfx*.h. But there was no check for  
png.h at this stage. So even if we found libpng in system dirs or when  
we build it on our own, -has('png') never returned true.

I changed the tests so it checks now for libpng in the shlib-hash that  
we get from Alien::SDL. This hash contains all found/build libs, and  
their path.

And why does it fail then?
BSD. LibPNG needs libz to run. Normally you would think that libpng is  
actually linked against libz, but hey, the BSD ppl dont think that  
way. I dont know the reasons but they decided to somehow build libpng  
without linking against libz.
when you do: ldd /path/to/ you will get all the dependencies  
printed as a list. This works pretty fine on most systems, like on our  
ubuntu's and what not.
On OpemBSD it prints an error message that the lib cant be loaded. But  
if you do LD_PRELOAD_LIBS=/path/to/ ldd /path/to/ it  
will work. So we have to preload the lib in order libpng will use it.
Doing this needs to happen on a very early level. Doing it from within  
a running perl is to late, even if we load libpng using DynaLoader.
The only thing I can think about atm is that we run a perl, load that, and start a child perl process that does the stuff we do now.

This problem applies to libpng (needs libz), libtiff (needs libjpeg)  
and libvorbis (needs libogg).
Before YAPC::EU I was working hard on that thing, I guess I can supply  
a patch in a few days.

Another problem that exists right now is that the old G4-Macs dont  
have a header file we want to use, I will debug that at some point. I  
dont think that there are so many users with a G4. These fails only  
come from BinGOs so far.

And there are still SDL::Controller(::Interface) fails. But since I  
dont really understand whats happening there it would be cool if the  
author (you kathekore ;o) would have a look at it.

So far from me, I will write a msg about the YAPC later.

See ya and take care,

Zitat von Kartik Thakore

Awesome thanks.

Kartik Thakore

On 2012-08-23, at 9:40 PM, Jeffrey Palmer


I think the problem is TIFF support on BSD and Solaris, but FROGGS will
know for sure.


On Thu, Aug 23, 2012 at 8:49 PM, Kartik Thakore  

Hey guys,

It looks like SDL lastest experimental has quite a few bit of fails. May I
get a summary of what the fails are?


Current dev releases

2012-06-13 Thread email

Hi all,

the current releases doesnt look that bad, but not quit good yet.

Alien-SDL 1.435_1 ( 11 ALL, 11 PASSes )
SDL 2.541_03 ( 12 ALL, 3 FAILs, 9 PASSes )

These 3 fails are on FreeBSD, twice about  
sdlx_controllier_interface.t, one about loading a lib (SDL_mixer).

SDL_mixer cant be loaded on this box because it cant find libogg and  
libvorbis, even when Alien::SDL found it during installation.

So there will be a new dev release for Alien::SDL these days,  
providing the needed information about installed libs.
There will be included a patch about MSVC (ActivePerl on windows) too,  
after that I hope we will get ActivePerl ppm packages for windows  

Btw, can sombody have a look at the SDLx::Controller::Interface issues?

Cheers, Tobias

AW: SDL 2.541_02 Released

2012-06-11 Thread email

Hi, I know whats wrong and why it didnt happened to me!

1) SDL_mixer loads libs like ogg/vorbis using SDL's loadso functions.  
These functions try to find libs like ogg in path. Since libbogg isnt  
in path when building it using Alien::SDL, it cant find it.

2) It worked on my box because I had the same lib (with exactly the  
same name, in my LD_LIBRARY_PATH, thats why it found  
the lib.

What we have to do (tested):
1) add these libs to Alien::SDL::ConfigData
2) tell SDL that it has to load these libs using Dynaloader, so  
SDL_mixer dont need to search for it or even load it.

I'll apply patches later.

Re: SDL::Mixer::Channels

2011-07-21 Thread email


Channels are not bound to left or right. A channel is just a slot that  
lets you play sound samples. And if you allocate two channels, you  
have channel 0 and 1 (not 1 and 2), thats why you dont hear your last  

You want to play sounds first on left and then on right box for example?

Cheers, FROGGS

Zitat von Anjali Menon


I got done with installing SDL and I wrote a simple program that opens the
audio device allocates both channels to the mixer, sets the volume of one of
the channels to be 0 , loads a wav file and then plays it twice one after
another with a delay in between. I have pasted the code below.

use SDL;
use SDL::Mixer;
use SDL::Mixer::Channels;
use SDL::Mixer::Samples;

 SDL::Mixer::open_audio( 44100, AUDIO_S16, 2, 4096 );
 SDL::Mixer::Channels::allocate_channels( 2 );
 my $chunk = SDL::Mixer::Samples::load_WAV('C:\1ksil1ch.wav');

 SDL::Mixer::Channels::play_channel( 1, $chunk, 0 );

SDL::Mixer::Channels::halt_channel( 1 );

 SDL::Mixer::Channels::play_channel( 2, $chunk, 0 );


The questions I have are:
1) When you say channel, do you mean one set of Left and Right Channels.
This is because I saw then in this case, for the first condition of
play_channel (when it was supposed to play to channel 1), it played the wave
file in both the right and left channel and in the second case (when it was
supposed to play to channel 2) there was no sound on either channels. Is
there a way for me to access the left and right channel separately?

2)Also, I played another sound file which was just an instance of a person
saying the syllable ta and when i played that file using these settings,
the pitch of the sound changed. I noticed that when I increased the sampling
frequency from 44100 to 154100, was when the sound was the correct pitch.
How is this happening? Is it something I am doing?

I hope you can help,


On Wed, Jul 20, 2011 at 2:08 PM, Anjali Menon anjalimeno...@gmail.comwrote:

Thanks Kartik

On Wed, Jul 20, 2011 at 12:03 PM, Kartik Thakore

To work with perl, I suggest you learn CPAN. It is how all this will
be installed for you.

cpan SDL

Should work.  If you have trouble just bug us at .
Also when replying to these threads CC

On Wed, Jul 20, 2011 at 11:35 AM, Anjali Menon
 At differing times yes but with an overlap. That was what most others
 not do. There is nothing in the docs for SDL::Mixer that say that it
 be done so I guess I'll just have to try it. Also, is there any way of
 installing this without getting git. Even if there is an older version
 ok with it if you could point me to it. I'm sorry for so many questions.
 I've never worked with perl before and there is something I need to get
 really fast thus the hurry. Thank you,


 On Wed, Jul 20, 2011 at 6:16 AM, My wrote:

 This should be possible. Just to be clear you want to play different
 on different channels at differing times. Right? Have you read the
 SDL::Mixer::* docs? Is anything unclear?

 Kartik Thakore

 On 2011-07-20, at 3:45 AM, Anjali Menon

  Hi Kartik,
  I have been going through the SDL::Mixer installation files and I had
  several questions about that. I am trying to write a program that
will play
  a certain wav file in one channel and somewhere in the middle of that
  it'll start playing another wav file in the other channel. Firstly,
is is
  possible with the SDL::Mixer::Channels extension to run two instances
of a
  player independent of eachother. I tried Win32::MediaPlayer and
  and both of them will stop a file that is currently playing if they
  given another play command. Can you tell me if SDL_Mixer can do this?
  a lot for your help,

Re: smpeg source for SDL

2011-07-21 Thread email
It is. To be exact it is searching for an sdl-config script. If that  
is missing, and the libs or headers are not found... well, you got the  

But as I said in the other mail, Alien::SDL dont build libs on native  
windows. There is a perbuilt binary pack.

Zitat von Chris Marshall

On Thu, Jul 21, 2011 at 5:45 AM, Sisyphus wrote:

I was mainly just curious to see how it all went on (32-bit and 64-bit)
native Win32, but it seems I have to install Alien::SDL (and its dependency
chain) anyway  which is rather annoying.

Is there some simple way to remove the Alien::SDL dependency and use the
libs I've already built ? No matter if there's not ... I'll just put it on
hold until I'm in a more relaxed and tolerant mood :-)

I thought Alien::SDL was supposed to check for an existing SDL install
first before installing its own version?


Re: smpeg source for SDL

2011-07-20 Thread email

Hi guys...

Latest Alien::SDL comes with a libpng15 patch, the patch can be seen here:

I am currently trying to get Alien::SDL and SDL to work on cygwin.  
Alien::SDL builds file on my machine. But without smpeg too. As far as  
i can see it is just looking for a missing smpeg-config script.

I commited my changes right now:

But for the moment, I can compile SDL but most of the test fail and I  
dont see any gfx window.

You may have a look at this too:;a=tree

Cheers, FROGGS

Zitat von My

On 2011-07-20, at 6:11 PM, Sisyphus wrote:

Hi Kartik,

From where should I get the smpeg source ? (A tarball or a direct   
link would be handy :-)

 Hmm I had a url for this but I think we had trouble getting smpeg   
working on vista. kmx can best help you here.

I first tried freshmeat, but couldn't find a download link anywhere  
 there ... then I googled up a page of ftp links which didn't seem   
to work.
Finally I did an 'svn co' of the trunk at icculus, but 'autoreconf   
-i' gave some warnings and an error about the missing macro   
AM_PATH_SDL. It created a configure script anyway, so I did a   
'./configure ...' just to see what would happen and it terminated   

./configure: AC_TYPE_SOCKLEN_T: command not found
./configure: line 15446: syntax error near unexpected token   

./configure: line 15446: `AM_PATH_SDL($SDL_VERSION,'

I'm on MS Windows Vista64.

I am sure Alien::SDL should compile this stuff for you. Did you try   
to cpan it an use the interactive menu to choose for smpeg?

Are you using cygwin, or dmake/strawberry perl, or activestate?

The SDL_mixer library builds ok without smpeg, but I'd rather   
include smpeg support if that's possible.

For smpeg on windows, again kmx is your best bet. i will cc his   
email. FROGGS may also be able to help.

Also (unrelated to smpeg), do you know of any patched IMG_png.c   
(from the SDL_image library) that caters for libpng15 ?
Not sure have you seen the CHANGELOG that comes with SDL_image or   
gentoo/debian patches?

(No urgency with any of this, btw  feel free to ignore.)




Re: FPS counter

2011-02-24 Thread email

Hello again =)

I have anover small question: how I can get current FPS rate?

I can limit it like:
But if my computer too slow i want to see real FPS rate. And it`s need
to control myself because if I do something wrong then FPS drops down.

Hmmm, I think I would do something like this:

Add vars:
$frames = 0;
$before = Time::HiRes::time;

Add a show_handler:
if($frames = 20) {
  $now= Time::HiRes::time;
  $fps= $frames / ($now - $before);
  $frames = 0;
  $before = $now;
  # blit fps to screen

Didnt tested it, but I think it should work this way...

Cheers, FROGGS

cpan report: UNKNOWN Alien-SDL-1.401 i386-netbsd 5.0.2

2010-04-30 Thread email
Hi, I recieved your (truncated) report, can you send me the full  
output please?

Report i got:

Thank you in advance, FROGGS.