Hi,
REALbasic 2006 Release 4
Mac OS X 10.4.8 / Novell suse linux 10.1
In the linux forum i found this code:
Dim f as FolderItem
Dim s as Sound
f = GetFolderItem("/root/Desktop/Kopete_Received.ogg")
s = f.OpenAsSound
s.play
and I wanted to know if it works on my linux machine.
The answer is YES MAN, IT WORKS (at last, it plays nice).
Of course, I changed the line
f = GetFolderItem("/root/Desktop/Kopete_Received.ogg")
to:
f = GetOpenFolderItem(FTSound.All)
FTSound have ogg and mp3 defined.
What is funny ( is this really funny ?) is that under Mac OS X, the code does
not works for .ogg files. I get one from a Beatles page in en.wikipoedia
(No_Pakistanis_sample.ogg) and I found that I can play it on linux, but not on
Macintosh.
After some checkings, it happens that the sound/ogg files are not readable as
is under REALbasic/Mac OS X!
s is always nil.
The ending code is:
Dim f As FolderItem
Dim s As Sound
f = GetOpenFolderItem(FTSound.All) // "/root/Desktop/Kopete_Received.ogg")
If f = Nil Then
MsgBox "The FolderItem Is Nil."
Return
End If
s = f.OpenAsSound
If s = Nil Then
MsgBox "The Sound Is Nil." + EndOfLine + EndOfLine + f.Type + " is probably
an unsupported sound file format."
Return
End If
s.Play
FTSound is:
Display Name: sound/mp3
Object Name: SoundMP3
MacType:
MacCreator:
Extensions: mp3
Icon:
Display Name: sound/ogg
Object Name: SoundOgg
MacType:
MacCreator:
Extensions: ogg
Icon:
HTH,
Emile
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>
Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>