Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
FROGGS committed Aug 26, 2012
1 parent 01dc406 commit ae26937
Showing 1 changed file with 14 additions and 9 deletions.
23 changes: 14 additions & 9 deletions lib/SDL/Mixer/Channels.pm6
Expand Up @@ -3,14 +3,19 @@ module SDL::Mixer::Channels;

use NativeCall;

our sub volume( int, int ) returns Int is native('libSDL_mixer') is symbol('Mix_Volume') { * }
our sub allocate( int ) returns Int is native('libSDL_mixer') is symbol('Mix_AllocateChannels') { * }
our sub finished( Code &callback(int) ) returns Int is native('libSDL_mixer') is symbol('Mix_ChannelFinished') { * }
our sub play( $channel, $sample, $loops, $time = -1 ) returns Int { return _play( $channel, $sample, $loops, $time ); }
our sub _play( int, OpaquePointer, int, int ) returns Int is native('libSDL_mixer') is symbol('Mix_PlayChannelTimed') { * }
our sub halt( int ) returns Int is native('libSDL_mixer') is symbol('Mix_HaltChannel') { * }
our sub playing( int ) returns Int is native('libSDL_mixer') is symbol('Mix_Playing') { * }
our sub paused( int ) returns Int is native('libSDL_mixer') is symbol('Mix_Paused') { * }
our sub fading( int ) returns Int is native('libSDL_mixer') is symbol('Mix_FadingChannel') { * }
# native calls to libSDL_mixer
# Note: 'is symbol' we be called 'is named' in future
our sub volume( int, int ) returns Int is native('libSDL_mixer') is symbol('Mix_Volume') { * }
our sub allocate( int ) returns Int is native('libSDL_mixer') is symbol('Mix_AllocateChannels') { * }
our sub finished( Code &callback(int) ) returns Int is native('libSDL_mixer') is symbol('Mix_ChannelFinished') { * }
our sub _play( int, OpaquePointer, int, int ) returns Int is native('libSDL_mixer') is symbol('Mix_PlayChannelTimed') { * }
our sub halt( int ) returns Int is native('libSDL_mixer') is symbol('Mix_HaltChannel') { * }
our sub playing( int ) returns Int is native('libSDL_mixer') is symbol('Mix_Playing') { * }
our sub paused( int) returns Int is native('libSDL_mixer') is symbol('Mix_Paused') { * }
our sub fading( int ) returns Int is native('libSDL_mixer') is symbol('Mix_FadingChannel') { * }

# wrappers (for example to support optional parameters)
# Note: dont use typed parameters here
our sub play( $channel, $sample, $loops, $time = -1 ) returns Int { _play( $channel, $sample, $loops, $time ) }

1;

0 comments on commit ae26937

Please sign in to comment.