From: Kartik Thakore Date: Sun, 2 Aug 2009 11:17:07 +0000 (-0400) Subject: Added Mix_VolumeChunk to SDL::Mixer + tests X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=4d2f5fe1fccfc713bbef5302348f80e2a10f2557;p=sdlgit%2FSDL_perl.git Added Mix_VolumeChunk to SDL::Mixer + tests --- diff --git a/lib/SDL/Mixer.pm b/lib/SDL/Mixer.pm index d84dd3a..a578126 100644 --- a/lib/SDL/Mixer.pm +++ b/lib/SDL/Mixer.pm @@ -1,8 +1,9 @@ # Mixer.pm # # a SDL module for manipulating the SDL_mixer lib. -# +# # Copyright (C) 2000,2002 David J. Goehrig +# Copyright (C) 2009 Kartik Thakore package SDL::Mixer; use strict; @@ -123,6 +124,7 @@ sub music_volume ($$) { return SDL::MixVolumeMusic($volume); } + sub halt_channel ($$) { my ($self,$channel) = @_; return SDL::MixHaltChannel($channel); @@ -202,6 +204,11 @@ sub playing ($$) { return SDL::MixPlaying($channel); } +sub mix_volume_chunk($$$) { + my ($self, $chunk, $volume) = @_; + return SDL::MixVolumeChunk($chunk, $volume); +} + sub playing_music () { return SDL::MixPlayingMusic(); } diff --git a/t/mixerpm.t b/t/mixerpm.t index f484487..fca1fc3 100644 --- a/t/mixerpm.t +++ b/t/mixerpm.t @@ -2,7 +2,7 @@ # # Copyright (C) 2003 Tels # Copyright (C) 2004 David J. Goehrig -# +# Copyright (C) 2009 Kartik Thakore # basic testing of SDL::Mixer BEGIN { @@ -58,6 +58,7 @@ can_ok ('SDL::Mixer', qw/ music_paused playing playing_music + mix_volume_chunk /); # these are exported by default, so main:: should know them: