Browse Source

Conversion to SuperStrict.

woollybah 8 years ago
parent
commit
eca1cb937f

+ 13 - 13
audio.mod/audio.bmx

@@ -1,5 +1,5 @@
 
 
-Strict
+SuperStrict
 
 
 Rem
 Rem
 bbdoc: Audio/Audio playback
 bbdoc: Audio/Audio playback
@@ -49,8 +49,8 @@ atexit_ Shutdown
 
 
 Public
 Public
 
 
-Const SOUND_LOOP=1
-Const SOUND_HARDWARE=2
+Const SOUND_LOOP:Int=1
+Const SOUND_HARDWARE:Int=2
 
 
 Rem
 Rem
 bbdoc: Audio sound type
 bbdoc: Audio sound type
@@ -90,7 +90,7 @@ Type TSound
 	@url can be either a string, a stream or an audio sample object.
 	@url can be either a string, a stream or an audio sample object.
 	The returned sound object can be played using #Play or #Cue.
 	The returned sound object can be played using #Play or #Cue.
 	End Rem
 	End Rem
-	Function Load:TSound( url:Object,loop_flag )
+	Function Load:TSound( url:Object,loop_flag:Int )
 		Local sample:TAudioSample
 		Local sample:TAudioSample
 		sample=TAudioSample( url )
 		sample=TAudioSample( url )
 		If Not sample sample=LoadAudioSample( url )
 		If Not sample sample=LoadAudioSample( url )
@@ -115,7 +115,7 @@ Type TChannel
 	about:
 	about:
 	If @paused is True, the audio channel is paused. Otherwise, the audio channel is unpaused.
 	If @paused is True, the audio channel is paused. Otherwise, the audio channel is unpaused.
 	End Rem
 	End Rem
-	Method SetPaused( paused )
+	Method SetPaused( paused:Int )
 	End Method
 	End Method
 	Rem
 	Rem
 	bbdoc: Set audio channel volume
 	bbdoc: Set audio channel volume
@@ -155,7 +155,7 @@ Type TChannel
 	#Playing will return False if the audio channel is either paused, or has been stopped
 	#Playing will return False if the audio channel is either paused, or has been stopped
 	using #Stop.
 	using #Stop.
 	End Rem
 	End Rem
-	Method Playing()
+	Method Playing:Int()
 	End Method
 	End Method
 
 
 End Type
 End Type
@@ -171,14 +171,14 @@ Type TAudioDriver
 		Return "Null"
 		Return "Null"
 	End Method
 	End Method
 	
 	
-	Method Startup()
+	Method Startup:Int()
 		Return True
 		Return True
 	End Method
 	End Method
 	
 	
 	Method Shutdown()
 	Method Shutdown()
 	End Method
 	End Method
 
 
-	Method CreateSound:TSound( sample:TAudioSample,loop_flag )
+	Method CreateSound:TSound( sample:TAudioSample,loop_flag:Int )
 		Return New TSound
 		Return New TSound
 	End Method
 	End Method
 	
 	
@@ -210,7 +210,7 @@ The @flags parameter can be any combination of:
 
 
 To combine flags, use the binary 'or' operator: '|'.
 To combine flags, use the binary 'or' operator: '|'.
 End Rem
 End Rem
-Function LoadSound:TSound( url:Object,flags=0 )
+Function LoadSound:TSound( url:Object,flags:Int=0 )
 	Return Driver().LoadSound( url,flags )
 	Return Driver().LoadSound( url,flags )
 End Function
 End Function
 
 
@@ -267,7 +267,7 @@ about:
 #ChannelPlaying will return #False if either the channel has been paused using #PauseChannel,
 #ChannelPlaying will return #False if either the channel has been paused using #PauseChannel,
 or stopped using #StopChannel.
 or stopped using #StopChannel.
 end rem
 end rem
-Function ChannelPlaying( channel:TChannel )
+Function ChannelPlaying:Int( channel:TChannel )
 	Return channel.Playing()
 	Return channel.Playing()
 End Function
 End Function
 
 
@@ -334,7 +334,7 @@ about:
 Returns an array of strings, where each string describes an audio driver.
 Returns an array of strings, where each string describes an audio driver.
 End Rem
 End Rem
 Function AudioDrivers$[]()
 Function AudioDrivers$[]()
-	Local devs$[100],n
+	Local devs$[100],n:Int
 	Local t:TAudioDriver=_drivers
 	Local t:TAudioDriver=_drivers
 	While t And n<100
 	While t And n<100
 		devs[n]=t.Name()
 		devs[n]=t.Name()
@@ -349,7 +349,7 @@ bbdoc: Determine if an audio driver exists
 about:
 about:
 Returns True if the audio drvier specified by @driver exists.
 Returns True if the audio drvier specified by @driver exists.
 End Rem
 End Rem
-Function AudioDriverExists( name$ )
+Function AudioDriverExists:Int( name$ )
 	name=name.ToLower()
 	name=name.ToLower()
 	Local t:TAudioDriver=_drivers
 	Local t:TAudioDriver=_drivers
 	While t
 	While t
@@ -363,7 +363,7 @@ bbdoc: Set current audio driver
 about:
 about:
 Returns true if the audio driver was successfully set.
 Returns true if the audio driver was successfully set.
 End Rem
 End Rem
-Function SetAudioDriver( name$ )
+Function SetAudioDriver:Int( name$ )
 	name=name.ToLower()
 	name=name.ToLower()
 	Shutdown
 	Shutdown
 	_driver=_nullDriver
 	_driver=_nullDriver

+ 23 - 23
directsoundaudio.mod/directsoundaudio.bmx

@@ -1,5 +1,5 @@
 
 
-Strict
+SuperStrict
 
 
 Rem
 Rem
 bbdoc: Audio/DirectSound audio
 bbdoc: Audio/DirectSound audio
@@ -30,22 +30,22 @@ Import Pub.DirectX
 
 
 Private
 Private
 
 
-Const CLOG=False
+Const CLOG:Int=False
 
 
 Global _driver:TDirectSoundAudioDriver
 Global _driver:TDirectSoundAudioDriver
 
 
 Type TBuf
 Type TBuf
 	Field _succ:TBuf
 	Field _succ:TBuf
-	Field _buffer:Byte Ptr,_seq,_paused
+	Field _buffer:Byte Ptr,_seq:Int,_paused:Int
 	
 	
-	Method Playing()
+	Method Playing:Int()
 		If _paused Return False
 		If _paused Return False
 		Local status:Int
 		Local status:Int
 		DSASS bmx_directsound_IDirectSoundBuffer_getstatus(_buffer, Varptr status)
 		DSASS bmx_directsound_IDirectSoundBuffer_getstatus(_buffer, Varptr status)
 		Return (status & DSBSTATUS_PLAYING)<>0
 		Return (status & DSBSTATUS_PLAYING)<>0
 	End Method
 	End Method
 	
 	
-	Method Active()
+	Method Active:Int()
 		If _paused Return True
 		If _paused Return True
 		Local status:Int
 		Local status:Int
 		DSASS bmx_directsound_IDirectSoundBuffer_getstatus(_buffer, Varptr status)
 		DSASS bmx_directsound_IDirectSoundBuffer_getstatus(_buffer, Varptr status)
@@ -86,7 +86,7 @@ Type TDirectSoundSound Extends TSound
 		Return t
 		Return t
 	End Method
 	End Method
 	
 	
-	Function Create:TDirectSoundSound( sample:TAudioSample,flags )
+	Function Create:TDirectSoundSound( sample:TAudioSample,flags:Int )
 		_driver.FlushLonely
 		_driver.FlushLonely
 		
 		
 		Select sample.format
 		Select sample.format
@@ -98,12 +98,12 @@ Type TDirectSoundSound Extends TSound
 
 
 		GCSuspend
 		GCSuspend
 
 
-		Local length=sample.length
-		Local hertz=sample.hertz
-		Local format=sample.format
-		Local chans=ChannelsPerSample[format]
-		Local bps=BytesPerSample[format]/chans
-		Local size=length*chans*bps
+		Local length:Int=sample.length
+		Local hertz:Int=sample.hertz
+		Local format:Int=sample.format
+		Local chans:Int=ChannelsPerSample[format]
+		Local bps:Int=BytesPerSample[format]/chans
+		Local size:Int=length*chans*bps
 
 
 		Local buf:Byte Ptr
 		Local buf:Byte Ptr
 		DSASS bmx_directsound_IDirectSound_createsoundbuffer(_driver._dsound, Varptr buf, length, hertz, format, chans, bps, size, flags, _driver._mode), "CreateSoundBuffer"
 		DSASS bmx_directsound_IDirectSound_createsoundbuffer(_driver._dsound, Varptr buf, length, hertz, format, chans, bps, size, flags, _driver._mode), "CreateSoundBuffer"
@@ -148,7 +148,7 @@ Type TDirectSoundChannel Extends TChannel
 		_buf=Null
 		_buf=Null
 	End Method
 	End Method
 	
 	
-	Method SetPaused( paused )
+	Method SetPaused( paused:Int )
 		If Not _buf Or _seq<>_buf._seq Return
 		If Not _buf Or _seq<>_buf._seq Return
 		If Not _buf.Active()
 		If Not _buf.Active()
 			_buf._seq:+1
 			_buf._seq:+1
@@ -188,12 +188,12 @@ Type TDirectSoundChannel Extends TChannel
 		bmx_directsound_IDirectSoundBuffer_setfrequency(_buf._buffer, Int(_hertz * rate))
 		bmx_directsound_IDirectSoundBuffer_setfrequency(_buf._buffer, Int(_hertz * rate))
 	End Method
 	End Method
 	
 	
-	Method Playing()
+	Method Playing:Int()
 		If Not _buf Or _seq<>_buf._seq Return
 		If Not _buf Or _seq<>_buf._seq Return
 		Return _buf.Playing()
 		Return _buf.Playing()
 	End Method
 	End Method
 
 
-	Method Cue( sound:TDirectSoundSound )
+	Method Cue:Int( sound:TDirectSoundSound )
 		Stop
 		Stop
 		Local t:TBuf=sound._bufs
 		Local t:TBuf=sound._bufs
 		While t
 		While t
@@ -226,14 +226,14 @@ Type TDirectSoundChannel Extends TChannel
 		Return True
 		Return True
 	End Method
 	End Method
 	
 	
-	Function Create:TDirectSoundChannel( static )
+	Function Create:TDirectSoundChannel( static:Int )
 		Local t:TDirectSoundChannel=New TDirectSoundChannel
 		Local t:TDirectSoundChannel=New TDirectSoundChannel
 		t._static=static
 		t._static=static
 		Return t
 		Return t
 	End Function
 	End Function
 
 
-	Field _volume#=1,_pan#=0,_rate#=1,_static
-	Field _sound:TSound,_buf:TBuf,_seq,_hertz,_playFlags
+	Field _volume#=1,_pan#=0,_rate#=1,_static:Int
+	Field _sound:TSound,_buf:TBuf,_seq:Int,_hertz:Int,_playFlags:Int
 	
 	
 End Type
 End Type
 
 
@@ -243,7 +243,7 @@ Type TDirectSoundAudioDriver Extends TAudioDriver
 		Return _name
 		Return _name
 	End Method
 	End Method
 	
 	
-	Method Startup()
+	Method Startup:Int()
 		If bmx_directsound_IDirectSound_create(Varptr _dsound)>=0
 		If bmx_directsound_IDirectSound_create(Varptr _dsound)>=0
 			If bmx_directsound_IDirectSound_setcooperativeLevel(_dsound, GetDesktopWindow(),DSSCL_PRIORITY )>=0
 			If bmx_directsound_IDirectSound_setcooperativeLevel(_dsound, GetDesktopWindow(),DSSCL_PRIORITY )>=0
 				Rem
 				Rem
@@ -280,7 +280,7 @@ Type TDirectSoundAudioDriver Extends TAudioDriver
 		bmx_directsound_IDirectSound_release(_dsound)
 		bmx_directsound_IDirectSound_release(_dsound)
 	End Method
 	End Method
 
 
-	Method CreateSound:TDirectSoundSound( sample:TAudioSample,flags )
+	Method CreateSound:TDirectSoundSound( sample:TAudioSample,flags:Int )
 		Return TDirectSoundSound.Create( sample,flags )
 		Return TDirectSoundSound.Create( sample,flags )
 	End Method
 	End Method
 	
 	
@@ -288,7 +288,7 @@ Type TDirectSoundAudioDriver Extends TAudioDriver
 		Return TDirectSoundChannel.Create( True )
 		Return TDirectSoundChannel.Create( True )
 	End Method
 	End Method
 	
 	
-	Function Create:TDirectSoundAudioDriver( name$,Mode )
+	Function Create:TDirectSoundAudioDriver( name$,Mode:Int )
 		Local t:TDirectSoundAudioDriver=New TDirectSoundAudioDriver
 		Local t:TDirectSoundAudioDriver=New TDirectSoundAudioDriver
 		t._name=name
 		t._name=name
 		t._mode=Mode
 		t._mode=Mode
@@ -318,9 +318,9 @@ Type TDirectSoundAudioDriver Extends TAudioDriver
 		Wend
 		Wend
 	End Method
 	End Method
 
 
-	Field _name$,_mode,_dsound:Byte Ptr,_lonely:TBuf
+	Field _name$,_mode:Int,_dsound:Byte Ptr,_lonely:TBuf
 
 
-	Global _seq
+	Global _seq:Int
 		
 		
 End Type
 End Type
 
 

+ 22 - 22
freeaudioaudio.mod/freeaudioaudio.bmx

@@ -1,5 +1,5 @@
 
 
-Strict
+SuperStrict
 Rem
 Rem
 bbdoc: Audio/FreeAudio audio
 bbdoc: Audio/FreeAudio audio
 about:
 about:
@@ -40,7 +40,7 @@ Import Pub.DirectX
 
 
 Private
 Private
 
 
-Const CLOG=False
+Const CLOG:Int=False
 
 
 Public
 Public
 
 
@@ -54,27 +54,27 @@ Type TFreeAudioSound Extends TSound
 	End Method
 	End Method
 
 
 	Method Play:TFreeAudioChannel( alloced_channel:TChannel )
 	Method Play:TFreeAudioChannel( alloced_channel:TChannel )
-		Local channel:TFreeAudioChannel,fa_channel
+		Local channel:TFreeAudioChannel,fa_channel:Int
 		If alloced_channel
 		If alloced_channel
 			channel=TFreeAudioChannel( alloced_channel )
 			channel=TFreeAudioChannel( alloced_channel )
-			If Not channel Return
+			If Not channel Return Null
 			fa_channel=channel.fa_channel
 			fa_channel=channel.fa_channel
 		EndIf		
 		EndIf		
 		fa_channel=fa_PlaySound(fa_sound,False,fa_channel)
 		fa_channel=fa_PlaySound(fa_sound,False,fa_channel)
-		If Not fa_channel Return
+		If Not fa_channel Return Null
 		If channel And channel.fa_channel=fa_channel Return channel
 		If channel And channel.fa_channel=fa_channel Return channel
 		Return TFreeAudioChannel.CreateWithChannel( fa_channel )
 		Return TFreeAudioChannel.CreateWithChannel( fa_channel )
 	End Method
 	End Method
 	
 	
 	Method Cue:TFreeAudioChannel( alloced_channel:TChannel )
 	Method Cue:TFreeAudioChannel( alloced_channel:TChannel )
-		Local channel:TFreeAudioChannel,fa_channel
+		Local channel:TFreeAudioChannel,fa_channel:Int
 		If alloced_channel
 		If alloced_channel
 			channel=TFreeAudioChannel( alloced_channel )
 			channel=TFreeAudioChannel( alloced_channel )
-			If Not channel Return
+			If Not channel Return Null
 			fa_channel=channel.fa_channel
 			fa_channel=channel.fa_channel
 		EndIf
 		EndIf
 		fa_channel=fa_PlaySound( fa_sound,True,fa_channel )
 		fa_channel=fa_PlaySound( fa_sound,True,fa_channel )
-		If Not fa_channel Return
+		If Not fa_channel Return Null
 		If channel And channel.fa_channel=fa_channel Return channel
 		If channel And channel.fa_channel=fa_channel Return channel
 		Return TFreeAudioChannel.CreateWithChannel( fa_channel )
 		Return TFreeAudioChannel.CreateWithChannel( fa_channel )
 	End Method
 	End Method
@@ -90,7 +90,7 @@ End Type
 
 
 Type TFreeAudioChannel Extends TChannel
 Type TFreeAudioChannel Extends TChannel
 
 
-	Field fa_channel
+	Field fa_channel:Int
 	
 	
 	Method Delete()
 	Method Delete()
 		If fa_channel fa_FreeChannel fa_channel
 		If fa_channel fa_FreeChannel fa_channel
@@ -101,7 +101,7 @@ Type TFreeAudioChannel Extends TChannel
 		fa_channel=0
 		fa_channel=0
 	End Method
 	End Method
 	
 	
-	Method SetPaused( paused )
+	Method SetPaused( paused:Int )
 		fa_SetChannelPaused fa_channel,paused
 		fa_SetChannelPaused fa_channel,paused
 	End Method
 	End Method
 	
 	
@@ -121,19 +121,19 @@ Type TFreeAudioChannel Extends TChannel
 		fa_SetChannelRate fa_channel,rate
 		fa_SetChannelRate fa_channel,rate
 	End Method
 	End Method
 	
 	
-	Method Playing()
-		Local status=fa_ChannelStatus( fa_channel ) 
+	Method Playing:Int()
+		Local status:Int=fa_ChannelStatus( fa_channel ) 
 		If status=FA_CHANNELSTATUS_FREE Return False
 		If status=FA_CHANNELSTATUS_FREE Return False
 		If status&FA_CHANNELSTATUS_STOPPED Return False
 		If status&FA_CHANNELSTATUS_STOPPED Return False
 		If status&FA_CHANNELSTATUS_PAUSED Return False
 		If status&FA_CHANNELSTATUS_PAUSED Return False
 		Return True
 		Return True
 	End Method
 	End Method
 	
 	
-	Method Position()
+	Method Position:Int()
 		Return fa_ChannelPosition( fa_channel )
 		Return fa_ChannelPosition( fa_channel )
 	End Method
 	End Method
 	
 	
-	Function CreateWithChannel:TFreeAudioChannel( fa_channel )
+	Function CreateWithChannel:TFreeAudioChannel( fa_channel:Int )
 		Local t:TFreeAudioChannel=New TFreeAudioChannel
 		Local t:TFreeAudioChannel=New TFreeAudioChannel
 		t.fa_channel=fa_channel
 		t.fa_channel=fa_channel
 		Return t
 		Return t
@@ -147,7 +147,7 @@ Type TFreeAudioAudioDriver Extends TAudioDriver
 		Return _name
 		Return _name
 	End Method
 	End Method
 	
 	
-	Method Startup()
+	Method Startup:Int()
 		If _mode<>-1 Return fa_Init( _mode )<>-1
 		If _mode<>-1 Return fa_Init( _mode )<>-1
 		If fa_Init( 0 )<>-1 Return True
 		If fa_Init( 0 )<>-1 Return True
 ?Not MacOS
 ?Not MacOS
@@ -159,8 +159,8 @@ Type TFreeAudioAudioDriver Extends TAudioDriver
 		fa_Close
 		fa_Close
 	End Method
 	End Method
 
 
-	Method CreateSound:TFreeAudioSound( sample:TAudioSample,flags )
-		Local channels,bits
+	Method CreateSound:TFreeAudioSound( sample:TAudioSample,flags:Int )
+		Local channels:Int,bits:Int
 
 
 		Select sample.format
 		Select sample.format
 ?BigEndian
 ?BigEndian
@@ -175,10 +175,10 @@ Type TFreeAudioAudioDriver Extends TAudioDriver
 			sample=sample.Convert(SF_STEREO16LE)
 			sample=sample.Convert(SF_STEREO16LE)
 ?
 ?
 		End Select
 		End Select
-		Local loop_flag
+		Local loop_flag:Int
 		If (flags & 1) loop_flag=-1
 		If (flags & 1) loop_flag=-1
 		channels=ChannelsPerSample[sample.format]
 		channels=ChannelsPerSample[sample.format]
-		If Not channels Return
+		If Not channels Return Null
 		bits=8*BytesPerSample[sample.format]/channels
 		bits=8*BytesPerSample[sample.format]/channels
 		Local fa_sound:Byte Ptr=fa_CreateSound( sample.length,bits,channels,sample.hertz,sample.samples,loop_flag )
 		Local fa_sound:Byte Ptr=fa_CreateSound( sample.length,bits,channels,sample.hertz,sample.samples,loop_flag )
 		If CLOG WriteStdout "Generated FreeAudio sound "+Long(fa_sound)+"~n"
 		If CLOG WriteStdout "Generated FreeAudio sound "+Long(fa_sound)+"~n"
@@ -186,18 +186,18 @@ Type TFreeAudioAudioDriver Extends TAudioDriver
 	End Method
 	End Method
 	
 	
 	Method AllocChannel:TFreeAudioChannel()
 	Method AllocChannel:TFreeAudioChannel()
-		Local fa_channel=fa_AllocChannel()
+		Local fa_channel:Int=fa_AllocChannel()
 		If fa_channel Return TFreeAudioChannel.CreateWithChannel( fa_channel )
 		If fa_channel Return TFreeAudioChannel.CreateWithChannel( fa_channel )
 	End Method
 	End Method
 		
 		
-	Function Create:TFreeAudioAudioDriver( name$,Mode )
+	Function Create:TFreeAudioAudioDriver( name$,Mode:Int )
 		Local t:TFreeAudioAudioDriver=New TFreeAudioAudioDriver
 		Local t:TFreeAudioAudioDriver=New TFreeAudioAudioDriver
 		t._name=name
 		t._name=name
 		t._mode=Mode
 		t._mode=Mode
 		Return t
 		Return t
 	End Function
 	End Function
 	
 	
-	Field _name$,_mode
+	Field _name$,_mode:Int
 	
 	
 End Type
 End Type
 
 

+ 27 - 27
openalaudio.mod/openalaudio.bmx

@@ -1,5 +1,5 @@
 
 
-Strict
+SuperStrict
 
 
 Rem
 Rem
 bbdoc: Audio/OpenAL audio 
 bbdoc: Audio/OpenAL audio 
@@ -31,12 +31,12 @@ Import Pub.OpenAL
 
 
 Private
 Private
 
 
-Const CLOG=False
+Const CLOG:Int=False
 
 
 'list of all non-static sources
 'list of all non-static sources
 Global _sources:TOpenALSource
 Global _sources:TOpenALSource
 
 
-Function CheckAL()
+Function CheckAL:Int()
 	Local err$
 	Local err$
 	Select alGetError()
 	Select alGetError()
 	Case AL_NO_ERROR
 	Case AL_NO_ERROR
@@ -60,28 +60,28 @@ End Function
 
 
 Type TOpenALSource
 Type TOpenALSource
 
 
-	Field _succ:TOpenALSource,_id,_seq,_sound:TOpenALSound,_avail
+	Field _succ:TOpenALSource,_id:Int,_seq:Int,_sound:TOpenALSound,_avail:Int
 	
 	
-	Method Playing()
-		Local st
+	Method Playing:Int()
+		Local st:Int
 		alGetSourcei _id,AL_SOURCE_STATE,Varptr st
 		alGetSourcei _id,AL_SOURCE_STATE,Varptr st
 		Return st=AL_PLAYING
 		Return st=AL_PLAYING
 	End Method
 	End Method
 			
 			
-	Method Paused()
-		Local st
+	Method Paused:Int()
+		Local st:Int
 		alGetSourcei _id,AL_SOURCE_STATE,Varptr st
 		alGetSourcei _id,AL_SOURCE_STATE,Varptr st
 		Return st=AL_PAUSED Or st=AL_INITIAL
 		Return st=AL_PAUSED Or st=AL_INITIAL
 	End Method
 	End Method
 	
 	
-	Method Active()	
-		Local st
+	Method Active:Int()	
+		Local st:Int
 		alGetSourcei _id,AL_SOURCE_STATE,Varptr st
 		alGetSourcei _id,AL_SOURCE_STATE,Varptr st
 		Return st=AL_PLAYING Or st=AL_PAUSED Or st=AL_INITIAL
 		Return st=AL_PLAYING Or st=AL_PAUSED Or st=AL_INITIAL
 	End Method
 	End Method
 	
 	
 	Method LogState()
 	Method LogState()
-		Local st
+		Local st:Int
 		alGetSourcei _id,AL_SOURCE_STATE,Varptr st
 		alGetSourcei _id,AL_SOURCE_STATE,Varptr st
 		Select st
 		Select st
 		Case AL_PAUSED WriteStdout "AL_PAUSED~n"
 		Case AL_PAUSED WriteStdout "AL_PAUSED~n"
@@ -96,10 +96,10 @@ End Type
 
 
 Function EnumOpenALDevices$[]()
 Function EnumOpenALDevices$[]()
 	Local p:Byte Ptr=alcGetString(Null,ALC_DEVICE_SPECIFIER )
 	Local p:Byte Ptr=alcGetString(Null,ALC_DEVICE_SPECIFIER )
-	If Not p Return
-	Local devs$[100],n
+	If Not p Return Null
+	Local devs$[100],n:Int
 	While p[0] And n<100
 	While p[0] And n<100
-		Local sz
+		Local sz:Int
 		Repeat
 		Repeat
 			sz:+1
 			sz:+1
 		Until Not p[sz]
 		Until Not p[sz]
@@ -137,8 +137,8 @@ Type TOpenALSound Extends TSound
 		Return t
 		Return t
 	End Method
 	End Method
 
 
-	Function Create:TOpenALSound( sample:TAudioSample,flags )
-		Local alfmt
+	Function Create:TOpenALSound( sample:TAudioSample,flags:Int )
+		Local alfmt:Int
 		Select sample.format
 		Select sample.format
 		Case SF_MONO8
 		Case SF_MONO8
 			alfmt=AL_FORMAT_MONO8
 			alfmt=AL_FORMAT_MONO8
@@ -166,7 +166,7 @@ Type TOpenALSound Extends TSound
 ?
 ?
 		End Select
 		End Select
 		
 		
-		Local buffer=-1
+		Local buffer:Int=-1
 		alGenBuffers 1,Varptr buffer
 		alGenBuffers 1,Varptr buffer
 		CheckAL
 		CheckAL
 		
 		
@@ -181,7 +181,7 @@ Type TOpenALSound Extends TSound
 		Return t
 		Return t
 	End Function
 	End Function
 
 
-	Field _buffer,_loop
+	Field _buffer:Int,_loop:Int
 
 
 End Type
 End Type
 
 
@@ -219,7 +219,7 @@ Type TOpenALChannel Extends TChannel
 		EndIf
 		EndIf
 	End Method
 	End Method
 	
 	
-	Method SetPaused( paused )
+	Method SetPaused( paused:Int )
 		If _seq<>_source._seq Return
 		If _seq<>_source._seq Return
 
 
 		If paused
 		If paused
@@ -252,8 +252,8 @@ Type TOpenALChannel Extends TChannel
 		alSourcef _source._id,AL_PITCH,rate
 		alSourcef _source._id,AL_PITCH,rate
 	End Method
 	End Method
 	
 	
-	Method Playing()
-		If _seq<>_source._seq Return
+	Method Playing:Int()
+		If _seq<>_source._seq Return False
 
 
 		Return _source.Playing()
 		Return _source.Playing()
 	End Method
 	End Method
@@ -267,7 +267,7 @@ Type TOpenALChannel Extends TChannel
 		alSourcei _source._id,AL_BUFFER,sound._buffer
 		alSourcei _source._id,AL_BUFFER,sound._buffer
 	End Method
 	End Method
 	
 	
-	Function Create:TOpenALChannel( static )
+	Function Create:TOpenALChannel( static:Int )
 	
 	
 		Local source:TOpenALSource=_sources,pred:TOpenALSource
 		Local source:TOpenALSource=_sources,pred:TOpenALSource
 		While source
 		While source
@@ -319,7 +319,7 @@ Type TOpenALChannel Extends TChannel
 		Return t
 		Return t
 	End Function
 	End Function
 	
 	
-	Field _source:TOpenALSource,_seq,_static
+	Field _source:TOpenALSource,_seq:Int,_static:Int
 	
 	
 End Type
 End Type
 
 
@@ -329,7 +329,7 @@ Type TOpenALAudioDriver Extends TAudioDriver
 		Return _name
 		Return _name
 	End Method
 	End Method
 	
 	
-	Method Startup()
+	Method Startup:Int()
 		_device=0
 		_device=0
 		If _devname
 		If _devname
 			_device=alcOpenDevice( _devname )
 			_device=alcOpenDevice( _devname )
@@ -359,7 +359,7 @@ Type TOpenALAudioDriver Extends TAudioDriver
 		alcCloseDevice _device
 		alcCloseDevice _device
 	End Method
 	End Method
 
 
-	Method CreateSound:TOpenALSound( sample:TAudioSample,flags )
+	Method CreateSound:TOpenALSound( sample:TAudioSample,flags:Int )
 		Return TOpenALSound.Create( sample,flags )
 		Return TOpenALSound.Create( sample,flags )
 	End Method
 	End Method
 	
 	
@@ -387,8 +387,8 @@ about:
 After successfully executing this command, OpenAL audio drivers will be added
 After successfully executing this command, OpenAL audio drivers will be added
 to the array of drivers returned by #AudioDrivers.
 to the array of drivers returned by #AudioDrivers.
 End Rem
 End Rem
-Function EnableOpenALAudio()
-	Global done,okay
+Function EnableOpenALAudio:Int()
+	Global done:Int,okay:Int
 	If done Return okay
 	If done Return okay
 	If OpenALInstalled() And alcGetString
 	If OpenALInstalled() And alcGetString
 		For Local devname$=EachIn EnumOpenALDevices()
 		For Local devname$=EachIn EnumOpenALDevices()