Re: SDL packaging team revival

2011-11-28 Thread Jon Dowland
On Sun, Nov 20, 2011 at 09:46:47AM +0100, Dominique Dumont wrote:
 Le Sunday 20 November 2011 00:41:40, Paul Wise a écrit :
  What happened to the idea of folding the SDL team into the games
  team?
 
 Nothing. I first heard of this idea several months ago and nothing
 happened since.

Not strictly true.  Fabian and I spent a few hours working on
sdl-mixer, in particular:  I got the package into git and started
rebasing patches on top of a new upstream version; Fabian reviewed all
the patches. I can't remember right now where that work is. I  hope
anyone who cares builds on top of our work and it isn't wasted.

 This idea is good but has some drawbacks: 
 - packaging lib and packaging games is sometwhat different 

The games team already package libs.

 - users of SDL libs may not be only games (*) 

I don't see the relevance here.  What difference does the
Maintainer: field make to users?

 - Since Game packaging members are focused on games, SDL libs
   packages are more likely to become victim of bystander apathy [1]

Thoroughly disagree here.

The games team is an active team with an existing infrastructure/set
of conventions: active alioth team admins; mailing list conventions;
tools and infrastructure to monitor bugs and perform QA checks; wiki
pages etc.

Creating a new team means doing all of the above again from scratch.
It also means any contributor needs to put work in to subscribe to
a new set of lists; request admin on a new project; learn a whole new
set of conventions for VCS or whatever: a total pain.

Whilst it's true that not all SDL users (in a packaging sense) are
games, and not all games use SDL; certainly the vast majority in both
direction do.  And having the SDL packages maintained by an active
team with the majority of participants having a vested interested in
their well being, and giving SDL bugs more eyeballs is a great thing
IMHO.

I'd encourage anyone with the time and motivation to work on SDL to
consider this avenue as I really believe it's the most sensible.

 Let's say folding SDL team is plan B. Let's see first if plan A (SDL
 team revival) is working.

If you really feel that's the best way, I wish you the best of luck.

 That said, Debian games team members are also welcome to join SDL
 packaging team. 

Whilst I'm no longer in the games team, the burden/barrier of joining
a new team and learning a whole new set of conventions on how to do
stuff etc. as briefly detailed above is too high for me to bother, I'd
rather put that energy into useful work.


Thanks,

-- 
Jon Dowland



How to play an mp3 file from a database

2011-11-28 Thread Alexander Becker
Dear all!

I just tried the example code of the SDL Manual where you play some music.
By the SDL manual, I refer to the one that is hidden at the bottom of the
sdl.perl.org page, so that you really have to search for it in order to find
it - and even then you have to get along with an ugly github interface. 

The good news is, that it worked perfectly here on Win 7 x64. Thank you!
The bad news is, that I don't have ogg or wav files, but mp3 files. And I
have them in a database (please don't ask why and please don't propose to
store them as files).

So, in general: Is there a way to play mp3 files? 
And in particular: is there a way to play mp3 files that are in a variable?
Or do I have to work with temporary files?

Here is what I got so far:

[code]
#!perl

use strict;
use warnings;
use SDL;
use Carp;
use SDL::Audio;
use SDL::Mixer;
use SDL::Mixer::Samples;
use SDL::Mixer::Channels;
use SDL::Mixer::Music;
SDL::init(SDL_INIT_AUDIO);

unless( SDL::Mixer::open_audio( 44100, AUDIO_S16SYS, 2, 4096 ) == 0 )
{
Carp::croak Cannot open audio: .SDL::get_error(); 
}

my $sound_file = 'data/ghostngoblins.mp3';
my $sample = SDL::Mixer::Samples::load_MUS($sound_file);

unless( $sample)
{
Carp::croak Cannot load file [$sound_file]: .SDL::get_error(); 
}

my $playing_channel = SDL::Mixer::Channels::play_channel( -1, $sample, 0 );

sleep(60);

SDL::Mixer::Music::halt_music();
SDL::Mixer::close_audio;
exit(0);
[/code]

However, this code dies with an error: Use of inherited AUTOLOAD for
non-method SDL::Mixer::Samples::load_MUS() is deprecated at
yadayada\play_sdl.pl line 20..
The above code works fine when using an ogg file (using load_MUS()) or an
wav file (load_WAV()).

Please help :)

Best regards,
Alex