I'm working on a MP3/WMA/WAV/
AAC/M4A/OGG player.
OGG part is using a codec pack I installed on my computer to play OGG, asdf. Same for M4A and AAC.
All functions (play, pause, stop) are working.
Miracles by the ICP is my test file. lol.
Here's the code if anyone's interested.
TextWindow.Show()
TextWindow.WriteLine("Initalizing...")
GraphicsWindow.Show()
TextWindow.WriteLine("Setting font and color properties...")
GraphicsWindow.FontName = "Tahoma"
GraphicsWindow.BackgroundColor = "#000000"
GraphicsWindow.PenColor = "#FFFFFF"
GraphicsWindow.BrushColor = "#FFFFFF"
TextWindow.WriteLine("Getting random Flickr picture...")
bg = Flickr.GetRandomPicture("Trees")
TextWindow.WriteLine("Setting it as the background in the audio player...")
GraphicsWindow.DrawImage(bg, 0, 0)
TextWindow.WriteLine("Drawing textbox...")
GraphicsWindow.DrawText(25, 25, "Please enter the filename of the audio you wish to play.")
GraphicsWindow.PenColor = "#000000"
GraphicsWindow.BrushColor = "#000000"
fn2enter = Controls.AddTextBox(25, 45)
TextWindow.WriteLine("Drawing buttons...")
GraphicsWindow.FontName = "Webdings"
bttnplay = Controls.AddButton("4", 25, 75)
bttnpause = Controls.AddButton(";", 50, 75)
bttnstop = Controls.AddButton("g", 75, 75)
TextWindow.WriteLine("Setting the width and height...")
GraphicsWindow.Width = 400
GraphicsWindow.Height = 135
TextWindow.WriteLine("Ready.")
begin:
Program.Delay(100)
GraphicsWindow.Title = filename
If Controls.LastClickedButton = bttnplay Then
filename = Controls.GetTextBoxText(fn2enter)
If filename = filenameubo Then
Else
TextWindow.Write("[")
TextWindow.Write(Clock.Time)
TextWindow.Write("] ")
TextWindow.Write("Loaded ")
TextWindow.Write(filename)
TextWindow.WriteLine("")
TextWindow.WriteLine("")
EndIf
filenameubo = Controls.GetTextBoxText(fn2enter)
Sound.Play(filename)
EndIf
If Controls.LastClickedButton = bttnpause Then
If filename = filenameubo Then
Sound.Pause(filename)
Else
Sound.Pause(filename)
Sound.Pause(filenameubo)
EndIf
EndIf
If Controls.LastClickedButton = bttnstop Then
If filename = filenameubo Then
Sound.Stop(filename)
Else
Sound.Stop(filename)
Sound.Stop(filenameubo)
EndIf
EndIf
Goto begin
Hard to believe I'm 13, and I've learned quite a bit of Torque and Small Basic in one day. o_o
SMALL BASIC IMPORT CODE: PDT387
http://smallbasic.com/smallbasic.com/program/?PDT387