• 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: avoiding VM page swaps for big sample buffers
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: avoiding VM page swaps for big sample buffers


  • Subject: Re: avoiding VM page swaps for big sample buffers
  • From: Frank (Steim) <email@hidden>
  • Date: Sat, 25 Sep 2004 18:15:20 +0200

David,

thanks for the quick reply, but I need this buffer because in my software the user can jump from one location in the buffer to another instantly by either Midi control or LFO's. And by instantly I mean within 1 millisecond. I don't think this can be achieved by streaming the data from disk.

Frank

On 25 Sep 2004, at 17:53, David Duncan wrote:


I would say that you are using a buffer that is WAY too large. It is possible to hold a certain amount of RAM (see man mlock) but this is VERY rude for large amounts of memory (like a sample buffer). You would do far better if you streamed in the data from disk during your playback from a secondary thread and then played back from a much smaller (say 30 sec max) buffer. There is some example code for a lock-less ring buffer in the ComplexPlayThru example (link below). This will let you read from your CA callback without blocking.

Complex Play Thru: <http://developer.apple.com/samplecode/ComplexPlayThru/ ComplexPlayThru.html>
--
Reality is what, when you stop believing in it, doesn't go away.
Failure is not an option. It is a privilege reserved for those who try.


David Duncan




_______________________________________________ Do not post admin requests to the list. They will be ignored. Coreaudio-api mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden
  • Follow-Ups:
    • Re: avoiding VM page swaps for big sample buffers
      • From: David Duncan <email@hidden>
References: 
 >avoiding VM page swaps for big sample buffers (From: Frank (Steim) <email@hidden>)
 >Re: avoiding VM page swaps for big sample buffers (From: David Duncan <email@hidden>)

  • Prev by Date: Re: avoiding VM page swaps for big sample buffers
  • Next by Date: Re: avoiding VM page swaps for big sample buffers
  • Previous by thread: Re: avoiding VM page swaps for big sample buffers
  • Next by thread: Re: avoiding VM page swaps for big sample buffers
  • Index(es):
    • Date
    • Thread