• 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: AudioConverter Optimal Use
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: AudioConverter Optimal Use


  • Subject: Re: AudioConverter Optimal Use
  • From: Bill Stewart <email@hidden>
  • Date: Wed, 23 Jul 2003 10:45:55 -0700

Benedict

On Wednesday, July 23, 2003, at 05:32 AM, Benedict Singer wrote:

Greetings again all,

My question this time is about the optimal use of AudioConverters.
Specifically, when I'm using an AudioConverter, there are little buzzes in
the output, and doing something else (like making the Dock magnify icons)
at the same time makes the output amazingly choppy. Is this an issue with
the way I'm using the AudioConverter, or is this just a processing power
issue (I really hope not, as this is an 800mHz G4!)?

There is probably one of two issues here:
Firstly you may not be using the converter correctly, so you are providing gaps in the data that is output..

However, more likely this is a threading problem with the code that you are using to output your audio data. (ie. the I/O thread fires, and you don't have data ready to give it because the thread you are using to keep you data full for output has been deferred, and you don't have output available)...

The AudioConverter itself is very unlikely to be doing so much work that you are overloading an I/O proc (unless you are are trying to convert megabytes of data at once in the I/O proc)...

How well instrumented is your code? ie. How much information do you have about your data flow and whether it is meeting the requirements you need?

Bill


The detailed situation: the output portion of the program gets PCM data in
format Y from other parts of the program. My audio hardware can output in
format X. So if Y != X then I slap an AudioConverter in there (actually, I
put one in in all cases and assume it's smart enough not to do anything if
Y = X - it appears to be). To use the AudioConverter, rather than just
directly buffering the PCM data and then writing full buffers to the
output, I ask the AudioConverter how much data it's going to want to
convert a full buffer, and then make a pre-buffer that size. PCM data then
fills up that pre-buffer, which is then converted into the real
buffer(using AudioConverterFillBuffer), which is written out (AudioDevice
stuff).

My question: is this the 'best' or most efficient way to drive the
AudioConverter? Could this method be responsible for the quality issues
I'm hearing?

Thanks!

Ben
_______________________________________________
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.


-- mailto:email@hidden
tel: +1 408 974 4056

________________________________________________________________________ __
"Much human ingenuity has gone into finding the ultimate Before.
The current state of knowledge can be summarized thus:
In the beginning, there was nothing, which exploded" - Terry Pratchett
________________________________________________________________________ __
_______________________________________________
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:
    • .mid files through CoreMidi
      • From: Roy Lovejoy <email@hidden>
References: 
 >AudioConverter Optimal Use (From: Benedict Singer <email@hidden>)

  • Prev by Date: examples and doc for HAL plugins?
  • Next by Date: .mid files through CoreMidi
  • Previous by thread: AudioConverter Optimal Use
  • Next by thread: .mid files through CoreMidi
  • Index(es):
    • Date
    • Thread