On 05/12/11 20:14, Stefan Bidi wrote:
So this works for you? That's great.
Just one thing, not that it really matters, but you don't need to call
-stop from -sound:didFinishPlaying:. At this point the the code in
NSSound would have already stopped and cleaned up. As a matter of
fact, you should get NO from the call to -stop.
Ah, yeah, I remove them, if someone else has suggestions for
improvements, let me know ;)
What I noticed while looking how to get it working, I found here:
http://developer.apple.com/library/mac/#documentation/Cocoa/Reference/ApplicationKit/Classes/NSSound_Class/Reference/Reference.html
That I should use:
- (void)setDelegate:(id< NSSoundDelegate
<http://developer.apple.com/library/mac/documentation/MusicAudio/Reference/NSSoundDelegate_Protocol/Reference/Reference.html#//apple_ref/occ/intf/NSSoundDelegate>
)/delegate
to set the delegate, but then when compiling, I got the error message
that it was unable to find the Protocol definition of NSSoundDelegate.
In GNUstep it seems, NSSoundDelegate is "only" a Category, not a Protocol.
Sebastian
/