[plt-scheme] Problem with play-sound

From: John Clements (clements at brinckerhoff.org)
Date: Tue May 6 14:06:54 EDT 2003

On Tuesday, May 6, 2003, at 01:54  PM, Djos wrote:

>   For list-related administrative tasks:
>   http://list.cs.brown.edu/mailman/listinfo/plt-scheme
> Hi all ,
> I made a little game which needs to play sound ,
> It works fine like this :
> (play-sound (build-path (current-directory) "sounds" "sound1.wav"))
> But when I do it Twice , the first sound is stopped before it 
> terminates
> when the second sound began to play ...
> So I try to make new thread each time sound is played , like this :
> (thread (lambda ()  (play-sound (build-path (current-directory) 
> "sounds"
> "sound1.wav")))

IIRC, play-sound also takes a boolean argument indicating whether the 
sound is to be played asynchronously.  What did you pass here?  Also, 
what platform is this?

FWIW, two sounds simultaneously worked fine for me on OS X with 
asynchronous-play set to #t. In fact, I'm currently suffering through 
two simultaneous copies of Jawbox' 'Savory', started with a 4 second 
delay.  Actually, I'm kind of enjoying it.


Posted on the users mailing list.