• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: CDDA and AIFF again
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: CDDA and AIFF again


  • Subject: Re: CDDA and AIFF again
  • From: Lubor Prikryl <email@hidden>
  • Date: Wed, 27 Feb 2002 21:58:32 +0100

Hi Bill and Jeff,
isn't it a good idea to add a file I/O streaming access to Audio 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}

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.

Best regards

Lubor, DSound





Is the PB async file access the best solution for OS X audio (e.g.
PBReadForkAsync)?

PBReadAsync suffers from two fatal flaws.

First, the priority of the Carbon IO thread is such that the Window Server
wins out over it. Actually, this is a more general problem since this is
true about any non-time constraint thread created by an unprivileged
process. The effect is that threads doing real work can be pre-empted by
actions that involve the Window Server such as drawing to the screen or
processing mouse events. At this point, there really isn't much you can do
about this problem.

The second, more subtle problem with PBReadAsync is that it does all it's
work in a single thread and only processes one request at a time in that
thread. This effectively eliminates any possibility of taking advantage of
the parallelism of multiple CPUs and/or multiple drive mechanisms. This is a
huge drawback on OS X and will prevent your app from taking full advantage
of all the resources available on the machine.

Probably the best strategy is to do your own disk IO scheduling using your
own threads and synchronous file IO calls. You could use either the BSD file
API or the synchronous calls in the File Manager, which ever you are most
comfortable with.

--

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

  • Follow-Ups:
    • Re: CDDA and AIFF again
      • From: Jeff Moore <email@hidden>
References: 
 >Re: CDDA and AIFF again (From: Jeff Moore <email@hidden>)

  • Prev by Date: Re: Java update without audio ?
  • Next by Date: Re: CDDA and AIFF again
  • Previous by thread: Re: CDDA and AIFF again
  • Next by thread: Re: CDDA and AIFF again
  • Index(es):
    • Date
    • Thread