• 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: playing files from disk [was: Help for dumb *****]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: playing files from disk [was: Help for dumb *****]


  • Subject: Re: playing files from disk [was: Help for dumb *****]
  • From: "AUDIOSYNTH.COM" <email@hidden>
  • Date: Wed, 27 Mar 2002 08:24:56 -0600 (CST)

On Tue, 26 Mar 2002, Arthur Clemens wrote:

> Is there a reason to use pthreads instead of NSThreads in a Cocoa application?

My own preference is to use pthreads in engine code and a higher level
lib in GUI code. Then I can port the engine to linux if I like.

> One other question: if I want to play multiple files from disk, would
> I need multiple IOprocs, or could I use one IOproc that iterates
> through all the channels?

No you only need one IOProc. There are ways to deal with multiple buffers.
I use a command queue to message between the IOproc and lower priority
thread. I send a command whenever there is something to do. The feeder
thread waits for a condition to check the command queue. You could use
a lock free ring buffer, or an atomic linked list stack for the command
queue.


--
--- james mccartney email@hidden <http://www.audiosynth.com>
SuperCollider - a real time synthesis programming language for the PowerMac.
<ftp://www.audiosynth.com/pub/updates/SC2.2.14.sea.hqx>
_______________________________________________
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: playing files from disk [was: Help for dumb *****] (From: Arthur Clemens <email@hidden>)

  • Prev by Date: Re: Basic question
  • Next by Date: Skipping backward and forward
  • Previous by thread: Re: playing files from disk [was: Help for dumb *****]
  • Next by thread: Re: Help for dumb *****
  • Index(es):
    • Date
    • Thread