Re: CDDA and AIFF again
Re: CDDA and AIFF again
- Subject: Re: CDDA and AIFF again
- From: Jeff Moore <email@hidden>
- Date: Wed, 27 Feb 2002 14:42:03 -0800
on 2/27/02 12:58 PM, Lubor Prikryl <email@hidden> wrote:
>
Hi Bill and Jeff,
>
isn't it a good idea to add a file I/O streaming access to Audio HAL?
No I don't think it would be a good idea to add such support to the HAL.
Such support belongs at a higher place in the system layering than the HAL.
>
While the DSP and audio is solved quite well, most audio applications
>
need to write and read their data to disk. (A special Audio Unit with
>
input / output to file is the best way to implement it}
I agree that it would be cool to have some APIs for reading and writing
audio files as well as to have an even higher level API that would play a
given file. All of these APIs would be layered above the HAL (and most of
the AudioUnit stuff too), though.
>
BTW, would be mapping files to the virtual memory good solution instead
>
of PB calls or own threads? In this case, it wouldn't use Carbon I/O
>
thread, too.
File mapping is kind of a double edged sword. On one hand, it provides an
easy to use and reasonably efficient means to move the data off the disk.
But, the pager also serializes its reads through a single thread. This puts
you right back in the same boat you were in with asynchronous File Manager
calls. The only difference being that the pager's thread runs at a higher
priority than the Carbon IO thread.
IMHO, the current best scheme for streaming data off of the disk is to use
blocking IO calls (either BSD calls or synchronous File Manager calls) in a
couple of worker threads (how many depends on such factors as how many
processors and disk mechanisms you're dealing with) that you own so that you
can completely control the IO scheduling.
--
Jeff Moore
Core Audio
Apple
_______________________________________________
coreaudio-api mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/coreaudio-api
Do not post admin requests to the list. They will be ignored.