Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!rutgers!apple!bionet!ames!coherent!NeXT!aozer From: aozer@NeXT.UUCP (Ali Ozer) Newsgroups: comp.sys.next Subject: Re: SoundKit problem Message-ID: <3974@next.NeXT.UUCP> Date: 26 Jun 89 18:11:36 GMT Reply-To: aozer@NeXT.com (Ali Ozer) Organization: NeXT, Inc. Lines: 35 >In the following program the third waitUntilStopped never returns. Am >I missing some important piece of information? This is a bug in the 0.9 SoundKit. To get around it, you should use the Application event loop (with the "run" method) and also use the Sound class delegation mechanism to get the sound to repeatedly play itself. In the simplest case, you'd have a subclass of Application that looks like: #import "TestApp.h" #import @implementation TestApp - appDidInit:app { [[[Sound newFromSoundfile:"foo.snd"] setDelegate:self] play]; return self; } - didPlay:sound { [sound play]; } @end The above code, coupled with an IB-generated main program and Makefile will work fine. The advantage of this code is that your events (such as hitting the "Quit" button) will be detected and processed. And of course it will play the sound more than 3 times. Ali Ozer, NeXT Developer Support aozer@NeXT.com