Re: Looping sound with NSSound
Re: Looping sound with NSSound
- Subject: Re: Looping sound with NSSound
- From: Jens Bauer <email@hidden>
- Date: Thu, 17 Jan 2002 15:23:17 +0100
Hi Eric,
Only a side-note:
To get rid of clicks, make sure the size of your sound buffer is
divisible by 512.
-This is a hardware issue, as far as I know. It's also healthy to make
sure the base address (beginning address) of each buffer is divisible by
16. (making it divisible by 64 won't hurt).
If you can't find any other way than using NSSound, you may want to try
using Carbon, as I know it's possible to do it under Carbon.
I'm sure I saw some Carbon sound examples on ftp.apple.com/developer/
Sample_Code/
On Wed, 16 Jan, 2002, Eric Hon-Anderson <email@hidden> wrote:
>
Is there any easy way to cause sound to loop with NSSound? NSSound is
>
certainly easy to use but there's not much flexibility exposed. I have
>
tried using a delegate and calling [sound play] in its
>
sound:didFinishPlaying handler, but I find that there's an unpleasant
>
"click" audible, apparently a result of too much time passing between
>
the sound finishing and being restarted.
>
>
If NSSound isn't going to help, are there any alternatives that won't
>
take too much effort?
Love,
Jens
--
Jens Bauer, Faster Software.