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

Re: AudioConverter


  • Subject: Re: AudioConverter
  • From: Greg Hamilton <email@hidden>
  • Date: Wed, 20 Nov 2002 14:29:36 +1100

Cheers, the header file is very useful. I see there's also some html format documentation for a Java AudioConverter class which has methods which correspond to the C functions defined in AudioConverter.h so there are some good clues as to how I might use this.

What's the usual approach to using the AudioConverter ? Is it quick enough that I could convert data as it's sampled or should I store the 32 bit data and convert it offline ?

Also, I had the perhaps erroneous impression that I should be able to use AudioStreams to achieve sample rate and buffer format conversion for the data sent from and received by my Audio Device ioProc ?

I'm not a big fan of ferreting around in header files trying to figure out how things work, mainly because I'm not very good at it. I'd love to see some updated docs and sample code for some of this stuff. It's probably nowhere near as complicated as it seems at the moment, I just don't know what I'm doing.

Greg

On Wednesday, November 20, 2002, at 01:38 PM, Bill Stewart wrote:

Documentation - what's that:)

AudioToolbox/AudioConverter.h

(seriously, we are trying to get more docs done - this is next on the list...)

Bill

On Tuesday, November 19, 2002, at 05:05 PM, Greg Hamilton wrote:

Hi,

I've seen a few mentions of the AudioConverter on this list recently.
As usual I don't know what it is or where it's documented.
help ?

Greg

On Tuesday, November 19, 2002, at 01:56 PM, Bill Stewart wrote:

You should use the AudioConverterFillBuffer if you're doing a sample rate conversion...

The AudioFilePlay code has some fairly comprehensive examples of using this in several examples in the CoreAudio SDK - PlayAudioFile is probably the simplest...

Bill

On Monday, November 18, 2002, at 10:58 AM, Martin Hairer wrote:

Hi,

I think a similar issue has already been raised on this list, but I couldn't find
it and I'm not sure it was really resolved.

The problem I am running into is that of changing the sampling rate of a piece
of sound using an AudioConverter. When I use AudioConverterConvertBuffer
with a comfortable value for ioOutputDataSize, I always get a
kAudioConverterErr_InvalidInputSize error, which probably means that the
AudioConverter would like to fill up my output buffer completely but doesn't have
enough data in the input buffer. Why doesn't it simply fill up as much as possible
and writes the achieved size in the ioOutputDataSize variable?

In other words, is there a simple way to tell an AudioConverter to convert some buffer
of input data into a (big) output buffer and to tell me how many bytes were actually
written to the output buffer? I must have overlooked something obvious, since this sounds
to me like one of the main uses for an AudioConverter...

I've already tried to call kAudioConverterPropertyCalculateOutputBufferSize prior
to AudioConverterConvertBuffer, but it doesn't work either, since it seems to always
return some minimal (or maximal) size for the buffer, but not the precise size...

Thanks for any insight,

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

References: 
 >Re: AudioConverter (From: Bill Stewart <email@hidden>)

  • Prev by Date: Rax 0.3b with MusicEffect support
  • Next by Date: Fwd: Logic Screen Updates
  • Previous by thread: Re: AudioConverter
  • Next by thread: Re: Future of JDirect: CoreAudio
  • Index(es):
    • Date
    • Thread