playing_music
/);
+
+if ( SDL::Init(SDL_INIT_AUDIO) < 0) {
+ plan( skip_all => "Cannot initialize audio!!" );
+ }
+
# these are exported by default, so main:: should know them:
-SDL::Init(SDL_INIT_AUDIO);
my $mixer = SDL::Mixer->new();
-isa_ok($mixer, 'SDL::Mixer');
+isa_ok($mixer, 'SDL::Mixer', 'Checking if mixer can be build');
my $fired = 0;
-SDL::Init(SDL_INIT_TIMER);
+if (SDL::Init(SDL_INIT_TIMER) < 0 )
+{
+ plan( skip_all => "Cannot initialize timer!!" );
+
+}
my $timer = new SDL::Timer
sub { $fired++ }, -delay => 30, -times => 1;