• 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: Questions about AudioFile API
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Questions about AudioFile API


  • Subject: Re: Questions about AudioFile API
  • From: Philippe Wicker <email@hidden>
  • Date: Wed, 2 Jul 2003 20:33:38 +0200

On Tuesday, July 1, 2003, at 07:56 PM, Bob Aron wrote:

Thanks Bob for the pointer. Most of the answers to my questions are
indeed in the FileManager specifications.
Thanks.

>
> On Wednesday, June 25, 2003, at 11:13 PM, Philippe Wicker wrote:
>
>> Hi everybody,
>>
>> I'm looking into the AudioFile API (AudioToolbox/AudioFile.h) and feel
>> perplexed concerning a few points:
>>
>> 1- most of the API includes a inUseCache parameter. Could it be
>> possible to have some hints about when one should or shouldn't use
>> this
>> feature. For instance, is it useful to set this flag to true when
>> "linearly" reading a large audio file (I don't think it is, but who
>> knows...)? Is it useful to set it to true when looping and loop points
>> are faraway (in that case, maybe the cached data has been overwritten
>> by more recent one)? Maybe the correct use in that case should be to
>> set this flag to true only for chunks including loop locators?
>>
>> 2- Assuming you have enough physical memory, what is the cached data
>> length of life? Is there some way to parameterize the cache?
>
> The inUseCache parameter to these APIs currently translates to the
> positionMode parameter of FSReadFork (documentation of this parameter
> below)). When inUseCache is false then the noCacheMask constant is
> used for the FSReadFork() call. You should decide on how to set this
> based on how you are using the APIs. Read the documentation below for
> more info.....
>
> ----------------------
> from OSX Documentation for FSReadFork():
>
> positionMode
> A constant specifying the base location within the fork for the start
> of the read. See Position Mode Constants for a description of the
> constants which you can use to specify the base location.
>
> The caller can also use this parameter to hint to the File Manager
> whether the data being read should or should not be cached. Caching
> reads appropriately can be important in ensuring that your program
> access files efficiently.
>
> If you add the forceReadMask constant to the value you pass in this
> parameter, this tells the File Manager to force the data to be read
> directly from the disk. This is different from adding the noCacheMask
> constant since forceReadMask tells the File Manager to flush the
> appropriate part of the cache first, then ignore any data already in
> the cache. However, data that is read may be placed in the cache for
> future reads. The forceReadMask constant is also passed to the device
> driver, indicating that the driver should avoid reading from any
> device caches.
>
> See Cache Constants for further description of the constants that
> you can use to indicate your preference for caching the read.
> ----------------------
>
> bob aron
> ____________________________________________
> CoreAudio Team
> Apple Computer Inc.
> email@hidden
Philippe Wicker
email@hidden
_______________________________________________
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.

References: 
 >Re: Questions about AudioFile API (From: Bob Aron <email@hidden>)

  • Prev by Date: Re: Multiple output devices under CoreAudio with Quicktime
  • Next by Date: Re: DLSMusicDevice rendering and performance
  • Previous by thread: Re: Questions about AudioFile API
  • Next by thread: i think i have a cold...
  • Index(es):
    • Date
    • Thread