I've been converting a mp3 player of mine over the past while now and I am having trouble with loading my Image
Framework brl.GLMax2d
Import Brl.Basic
Import Brl.Blitz
Import Pub.Fmod
Graphics 600,480,0,60
Type TMusic
Field PlayButtonX:Int
Field PlayButtonY:Int
Field Volume:Int = 100
Field VolumeMax:Int = 200
Global Image:TImage
Global filter$
Global Mp3File$
Global Mp3Stream:Int
Method Start()
FSOUND_SetOutput(FSOUND_OUTPUT_DSOUND)
FSOUND_Init(44100, 32, FSOUND_INIT_DSOUND_HRTF_FULL)
FSOUND_Stream_SetBufferSize(2000)
FSOUND_SetDriver(2)
End Method
Method PlayButton()
If PlayButtonX = MouseX()
filter = "Mp3: mp3;All Files:*"
Mp3File=RequestFile("Select your mp3 file to open =]",filter$)
Mp3Stream = FSOUND_Stream_Open( Mp3File.ToCString(), FSOUND_STREAMABLE, 0, 0 )
FSOUND_SetSFXMasterVolume(Volume)
FSOUND_Stream_Play(FSOUND_FREE, Mp3Stream)
EndIf
End Method
Method GUI()
DrawImage Image,PlayButtonX,PlayButtonY
End Method
End Type
Type TMain
Field Music:TMusic
Method New()
Execute()
End Method
Method Execute()
Music:TMusic = New TMusic
Repeat
Music.Start()
Music.GUI()
Music.PlayButton()
Music.Image=LoadImage"\untitled.png"
GCCollect()
Flip;Cls
Until KeyHit(KEY_ESCAPE)
End Method
End Type
New TMain
The error I get is "Compile Error: Unable to convert from 'TImage(Object,Int)' to 'TImage' Build Error: failed to compile C:/Documents and Settings/*My Windows user name here*/Desktop/mp3 player/mp3 player.bmx" I also set debug mode on but that's useless because the program can't even compile yet.
|