• 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: Another newbie question -- format of raw data
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Another newbie question -- format of raw data


  • Subject: Re: Another newbie question -- format of raw data
  • From: William Stewart <email@hidden>
  • Date: Mon, 31 Jul 2006 18:39:42 -0700


On 31/07/2006, at 1:03 PM, Bill Cunning wrote:

Hi all,



I have been fighting this beast for a while now, and progress is being made slowly but surely, but It seems I have hit a brick wall.



I can capture the audio data using the ‘guts’ more or less of complex play through and another sample … and the raw audio from the mac à> to server à> back to mac works fine. The issue seems to be when I try and send it to a PC or run it through an ADPCM Codec that all heck breaks loose . mac -> codec-enc ---- codec-dec – mac fails with loud screeching noises and sending it off to a pc gives about the same results.



It appears I am getting 32bit audio data

This will be floats with a range of -1 < 0 < 1
from the hardware (Bytes per frame == 4) single channel and the raw data appears to be BigEndian (00 00 xx xx) ---

I found the flags to set 16bit capture but setunitproperties fails if I try and change it -- that would be question one … is it possible to change the #bytes
Not just this way. The ASBD is a rather abstract structure with many internal dependencies - for instance, if bytes Per Frame changes, then bytes per packet needs to change and probably bits per channel - if you are going from float to int, then the flags also change, etc... This has been discussed many times on the list so a search through the archives should throw some light on this.
in captured stream? If I configure from midi configuration utility it seems to let me set it to 16 bit, but this seems to be ignored when I open the device / audio unit



The other question is is this data stream really just LinearPCM or is there some other kind of encoding going on.

From the device or an AU - Linear PCM (float)
If it was just audio data, it would seem I could do something like value/256 à out à value *256 and it would work
slowly - CA API services also provide efficient conversions to convert to/from float/int formats - the AudioConverter being the main API that does this - you can also set these different lpcm formats on the output unit and it will handle it for you - have a look at the DefaultOutputUnit code in /Developer/Examples/CoreAudio - it also has the various different set ups for ASBDs for float, 16bit int, 24 bit int.

Bill

.. but this (test case that has no use) causes playback to fail. Is there some other kind of information encoded in the bitstream that is getting lost when I try and process it this way.



Thanks for your help



Bill



iLinc Communications



Bill Cunning

Senior Software Developer

email@hidden



www.ilinc.com

165 Jordan Road

Troy, NY  12180



877.960.1700, X454







 _______________________________________________
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

--
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
________________________________________________________________________ __


_______________________________________________
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: 
 >Another newbie question -- format of raw data (From: "Bill Cunning" <email@hidden>)

  • Prev by Date: Re: Encoding Mono IMA4
  • Next by Date: Re: OpenAL Version Confusion
  • Previous by thread: Re: Another newbie question -- format of raw data
  • Next by thread: OpenAL Version Confusion
  • Index(es):
    • Date
    • Thread