[Q][NEWBIE]mp3 and other issues

Stephan B. Wessels swessels at one.net
Thu May 23 13:41:30 UTC 2002


That sounds like a fun project.

If you are having problems because the StreamingMP3Sounds class expects full
path names, you could construct the complete file path from your ³relative²
one.

Try something out like this.  For this example, assume I have a folder named
³Luna² inside my Squeak folder.  And inside the ³Luna² folder there is a
file named ³activeBottom.bmp².

    fileName _ 'activeBottom.bmp'.
    folderName _ 'Luna'.
    folderDirectory _ FileDirectory default directoryNamed: folderName.
    fullName _ folderDirectory fullNameFor: fileName.

³FileDirectory default² always answers the directory containing your Squeak
image file.  Presumably you can establish a relative path from there without
problem.

The #directoryNamed: method will answer the directory of the named folder or
sub-directory.
The #fullNameFor: method answers the full file path resolved which you could
then pass on to the StreamingMP3Sounds class.

Hope that helps,

 - Steve


On 5/22/02 9:39 PM, "Lic. Edgar J. De Cleene" <edgardec2001 at yahoo.com.ar>
wrote:

> I try to aded sound effects to our game in progress (TEG clone of Risk)
> I record old series ³Combat¹ from TV with SoundJam on my Mac and do some
> cutting with mEdit b 1.03 and found this problems.
> Cuttiings mp3 not playing in Squeak (original recording yes)
> Other software on  Mac working fine.
> Also , I keep auxiliary  files in a folder (.gif, .jpg, etc) for accessing .
> I set the folder once at start and later if I wish use any of them only set
> the name of file ej, filexxx.gif.
> This is not the case with mp3 files, seems the only method is tell the
> complete path to StreamingMP3Sound onFileNamed: path.
> I appreciate any advice to this problems
> Edgar De Cleene


-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20020523/f54f5c7c/attachment.htm


More information about the Squeak-dev mailing list