Skip to content
This repository
Browse code

added constants, the export tag mix_init isnt respected

  • Loading branch information...
commit 01dc4068047be3ad5cbc75b709d7c2509288c98f 1 parent acf2844
Tobias Leich authored August 26, 2012

Showing 1 changed file with 28 additions and 2 deletions. Show diff stats Hide diff stats

  1. 30  lib/SDL/Mixer.pm6
30  lib/SDL/Mixer.pm6
@@ -3,7 +3,33 @@ module SDL::Mixer;
3 3
 
4 4
 use NativeCall;
5 5
 
6  
-our sub open_audio( int32, int32, int32, int32 )	returns Int	is native('libSDL_mixer')	is symbol('Mix_OpenAudio')			{ * }
7  
-our sub close_audio( )								returns Int	is native('libSDL_mixer')	is symbol('Mix_CloseAudio')			{ * }
  6
+our constant $MIX_INIT_FLAC is export(:mix_init) = 0x00000001;
  7
+our constant $MIX_INIT_MOD  = 0x00000002;
  8
+our constant $MIX_INIT_MP3  = 0x00000004;
  9
+our constant $MIX_INIT_OGG  = 0x00000008;
  10
+
  11
+our constant $MIX_CHANNELS          = 8;
  12
+our constant $MIX_DEFAULT_FORMAT    = 32784;
  13
+our constant $MIX_DEFAULT_FREQUENCY = 22050;
  14
+our constant $MIX_DEFAULT_CHANNELS  = 2;
  15
+our constant $MIX_MAX_VOLUME        = 128;
  16
+our constant $MIX_CHANNEL_POST      = -2;
  17
+
  18
+our constant $MIX_NO_FADING  = 0,
  19
+our constant $MIX_FADING_OUT = 1,
  20
+our constant $MIX_FADING_IN  = 2,
  21
+
  22
+our constant $MUS_NONE     = 0;
  23
+our constant $MUS_CMD      = 1;
  24
+our constant $MUS_WAV      = 2;
  25
+our constant $MUS_MOD      = 3;
  26
+our constant $MUS_MID      = 4;
  27
+our constant $MUS_OGG      = 5;
  28
+our constant $MUS_MP3      = 6;
  29
+our constant $MUS_MP3_MAD  = 7;
  30
+our constant $MUS_MP3_FLAC = 8;
  31
+
  32
+our sub open_audio( int32, int32, int32, int32 )	returns Int	is native('libSDL_mixer')	is symbol('Mix_OpenAudio')	{ * }
  33
+our sub close_audio( )								returns Int	is native('libSDL_mixer')	is symbol('Mix_CloseAudio')	{ * }
8 34
 
9 35
 1;

0 notes on commit 01dc406

Please sign in to comment.
Something went wrong with that request. Please try again.