Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Benjamin_R_
Beginner
53 Views

How to interpred Audiodata!?

I am trying to access the RawAudio-Data as described in example 113 in the Dokumentation.

using this configuration:

// Set the audio configuration.

PXCAudioSourceService::AudioProfile pinfo={};

pinfo.audioInfo.nchannels=2;

pinfo.audioInfo.format=PXCAudio::AUDIO_FORMAT_PCM;

pinfo.audioInfo.sampleRate=48000;

and:

PXCAudio::AudioData data;
pxcStatus status = sample->AcquireAccess(PXCAudio::ACCESS_READ, &data);

gives me a pointer to a uchar buffer that should contain the audio data with 16 Bit per Sample.

But it is not said in which format the sample is stored (short,ushort..., big endian, small endien) or in witch order the samples of the two channels are stored. No matter how I tried all I get from the device is Noise. (I even have the same problem with the AUDIO_FORMAT_IEEE_FLOAT format.)

Does anybody know how the data is stored exactly?

Can anybody provide a working example how to interpread the data in the correct way?

Thanks in advance.

0 Kudos
0 Replies
Reply