Hi, I was wondering, what's an easy and quick way to load and play a sound file, say a wav, in a squeak program? If you have experience with any other format (midi, mp3, etc.) feel free to share it. What I'm really interested in is how sound works in squeak.
Regards
FrankBz <kyotosong <at> libero.it> writes:
Hi, I was wondering, what's an easy and quick way to load and play a sound file, say a wav, in a squeak program? If you have experience with any other format (midi, mp3, etc.) feel free to share it. What I'm really interested in is how sound works in squeak.
Regards
Hi Frank,
Here is a basic load/play....
thewavfile:= SampledSound fromWaveFileNamed: '(path)\filename.wav'
(AbstractSound soundNamed:'thewavfile') play
Regards
Nicholas Tocadelius
hi, I get a Dictionary error when trying to execute the above code. Perhaps I need to store the loaded sound in a sound dictionary of the environment?
thanks in advance
Hm. Try replacing the second line with
(thewavfile asSampledSound) play
Regards, Nicholas
beginners@lists.squeakfoundation.org