On Thu, May 12, 2011 at 4:51 PM, Sebastian Reitenbach <
[email protected]> wrote:

> 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 ;)
>

If you want have an "infinite loop" option, you can just call [NSSound
-setLoop: YES] and call that again with NO whenever the user hits a trigger.

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.
>

Would you mind submitting a patch?  I really doubt I'll have time to look at
this stuff within a reasonable time frame.
_______________________________________________
Discuss-gnustep mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/discuss-gnustep

Reply via email to