On Fri, Jun 5, 2009 at 1:15 AM, David Ayers <[email protected]> wrote:

> Please remember that NSSound can also be used on headless servers
> (without sound cards) to merely process/stream/?? NSSound objects.  So
> please try convert lazily when you actually need it.
>
I thought about that, and I not really sure how to do it.  GNUstep's old
NSSound code just did exactly what I'm doing now: read the data in,
converted everything and stored it in the NSData object.  This method has
some serious drawbacks, such as not being able to scale very well (a 4
minute, 16-bit, 44100 Hz sound will take up close to 22MB in memory).  What
most systems do, and I'm going to guess Apple does the same thing with
NSSound + CoreAudio is just send the relevant info to another thread that
actually does the streaming.

However, in order to do stream from file, or from memory, the reading and
writing code will have to be very tightly integrated.

Stefan
_______________________________________________
Gnustep-dev mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/gnustep-dev

Reply via email to