• 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: Still trying to write buffers to audio file.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Still trying to write buffers to audio file.


  • Subject: Re: Still trying to write buffers to audio file.
  • From: Christian Rober <email@hidden>
  • Date: Thu, 14 Jan 2016 13:07:26 -0500

Hello Alexander,

From briefly looking at your code sample(s), two possible things:

1) You probably need to set the "client" ASBD on the ExtAudioFileRef.  This is done via the kExtAudioFileProperty_ClientDataFormat property.  This tripped me up when I first used this API; I had thought that the ASBD used when creating the ExtAudioFile object was enough to get it working but I was incorrect.

2) You will want to call ExtAudioFileWriteAsync with your file reference, 0 and nil for the latter arguments BEFORE you actually pass audio data to that function in your RT thread (this is because the first call may do some allocations and you don't want to do that in an RT thread, look at the fine print in the header for more info).

--Christian
 

On Wed, Jan 13, 2016 at 5:47 PM, Alexander Bollbach <email@hidden> wrote:
I am still unable to write audio samples from my AUHAL's input callback to a file.  I have tried a number of things including using the asynchronous version of writing to an audio file in ExtAudioFileServices.  Even wrapping the call in a dispatch queue in fear that it was going out of scope.  Even though it is probably some small obvious thing that is missing (i'm only a few months into using core audio) I posted a stack question about it.  Apparently other uses have gotten the  (-50) error.  That is indeed the error I get.  (you can run the GitHub Repo in xcode to verify this).  I've been casually trying to get this to work over the past few days and I'm not getting any results.  Any idea what I might be doing wrong?





 _______________________________________________
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

 _______________________________________________
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

References: 
 >Still trying to write buffers to audio file. (From: Alexander Bollbach <email@hidden>)

  • Prev by Date: Re: AUMIDISynth program change messages not working?
  • Next by Date: Re: Still trying to write buffers to audio file.
  • Previous by thread: Re: Still trying to write buffers to audio file.
  • Next by thread: plugin developers responsibilities
  • Index(es):
    • Date
    • Thread