• 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
Direct-to-disk and 10.2?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Direct-to-disk and 10.2?


  • Subject: Direct-to-disk and 10.2?
  • From: Martin Hairer <email@hidden>
  • Date: Sat, 07 Sep 2002 16:39:30 +0200

Hi all,

Sorry for the long post, but I'm getting desperate...

I am having a hard time making direct-to-disk recording work under Jaguar, using the SoundManager. I am doing the standard thing, i.e. I have a circular buffer and make calls to SPBRecord with a completion routine. In the completion routine, I first copy the content of the recording buffer into the circular buffer (using BlockMoveData), then call SPBRecord, and finally write the content of the circular buffer on the disk, using PBWriteForkAsync. What happens is that everything works fine for 5 minutes (plus minus about 10-20 seconds). Then suddenly the call to PBWriteForkAsync seems to have no effect anymore (i.e. the callback I put on the write command is called only something like 10 seconds(!) after the call to PBWriteForkAsync is performed, instead of being called almost immediately). As a result, the circular buffer fills up and the program interrupts the recording. The phenomenon is 100% reproducible.

My hardware is a Titanium PowerBook G4 (667 MHz) with MacOS 10.2 and I use an iMic for the recording. Under MacOS 10.1 everything works perfectly well. Also using the intergated mic instead of the iMic seems to work sometimes (but not always).

Among my (fruitless) attemps to circumvent the problem are:
- Replace PBWriteForkAsync by PBWriteForkSync: after 5 minutes, the call to PBWriteForkSync suddenly takes 10 or 20 seconds to return.
- Having the disk writing part running in a separate thread that is triggered from the callback doesn't change anything to this behavior.
- Increasing the buffer sizes doesn't help (so far the callback is called every 4096 samples and the circular buffer is six times that size).
- Making calls to PBFlushForkAsync (or PBFlushForkSync) every now and then doesn't help either.

Does anyone have some insight? I'm running out of ideas... Thanks a lot,

Martin

HairerSoft
http://www.hairersoft.com/
_______________________________________________
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: Direct-to-disk and 10.2?
      • From: Jeff DuMonthier <email@hidden>
  • Prev by Date: AudioUnit Newbie
  • Next by Date: Re: Direct-to-disk and 10.2?
  • Previous by thread: Re: Core Audio SDK available
  • Next by thread: Re: Direct-to-disk and 10.2?
  • Index(es):
    • Date
    • Thread