Ok, basically what I want to do is play a system sound every K seconds,
not a stream of any sort (hence the zero buffer size). However, I use
the SndStreamCreate function to spawn a callback function that is called
at a certain rate (see below). This plays the sound ok, but also a
rattling effect.


  error = SndStreamCreate (&StreamRef, sndOutput,
                                    8000, sndInt8,
                                    sndMono, sound_callback,
                                    (void *)&data,  0, false);


static Err sound_callback(void *userDataP,  SndStreamRef stream,  void
*bufferP, UInt32 frameCount)
{
  
    SndPlaySystemSound (sndWarning);
    return errNone;
}  
  
   

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Robert
Scott
Sent: 19 April 2004 17:54
To: Palm Developer Forum
Subject: Re: SndStreamCreate


On Mon, 19 Apr 2004 16:56:51 +0100, "Jeff Leal"
<[EMAIL PROTECTED]> wrote:

>Hi,
>
>       I want to make a normal sound every K seconds using SndDocmd.
However, 
>even playing around with the sample rate for the callback and frequency

>of the sound, I still get this annoying shuffle sound every now and 
>then. Anyone know how to get rid of that or do the above sensibly?

I don't know what you mean by the "shuffle" sound.  I know that it is
possible using SndStreamCreate and SndStreamStart and the callback to
make a continuous sound.  Make sure that your sound-generation software
is fast enough to keep up.  If it falls behind in the callback then the
system may find itself at the end of a buffer without any new buffer
ready to continue the sound.


Robert Scott, Ypsilanti, MI
(reply through this forum, not by e-mailing me directly)

-- 
For information on using the Palm Developer Forums, or to unsubscribe,
please see http://www.palmos.com/dev/support/forums/



-- 
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palmos.com/dev/support/forums/

Reply via email to