• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

How to get sound samples?

Explorer ,
Jun 05, 2019 Jun 05, 2019

Copy link to clipboard

Copied

I am currently writing an Output aex plugin. It already works with outputting videos (AddFrame) but how do i get the sound samples?

A_Err (*AEIO_AddSoundChunk)(

AEIO_BasicData *basic_dataP,

AEIO_OutSpecH outH,

const A_Time *start,

A_u_long num_samplesLu,

const void *dataPV);

How do I get the samples?

Thank you.

P.S.: The function has a different signature in the header file than in the PDF. Am I missing something?

TOPICS
SDK

Views

1.2K

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Explorer , Aug 08, 2019 Aug 08, 2019

the sound samples are in "dataPV" and there will be "num_samplesLu" starting at time "start".

you can use AEGP_GetOutSpecSoundSampleSize, AEGP_GetOutSpecSoundChannels, and AEGP_GetOutSpecSoundEncoding with outH to get the bytes per sample, number of channels, and the format the samples are in. the samples will be interleaved.

Votes

Translate

Translate
Explorer ,
Jul 04, 2019 Jul 04, 2019

Copy link to clipboard

Copied

I bet the sample data is in dataPV. But how in what format / structure? Anybody?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Jul 05, 2019 Jul 05, 2019

Copy link to clipboard

Copied

Check the file SDK_Backwards.cpp in the included SDK examples, it is a good starting point on how to check out audio tracks, modify/process them and write them back.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Jul 05, 2019 Jul 05, 2019

Copy link to clipboard

Copied

Thanks, but the thing is that the samples are stored in:

const void *dataPV

is of type "const void*". I need to know what I need to cast it to.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Jul 08, 2019 Jul 08, 2019

Copy link to clipboard

Copied

Yes, this area is undocumented and the current headers are inconsistent (e.g. using the undefiend AEIO_SndWorldH handle). You might try just dumping the data and opening it with an audio editor to see if it is always a certain raw format or actually the compressed audio stream according to the project/export settings. Probably only Adobe can help you here...

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Jul 08, 2019 Jul 08, 2019

Copy link to clipboard

Copied

Adobe admitted on twitter the documentation needs to be corrected.

I guess the data might be different depending on the number of channels, sample format,... that's why it could be a void*. But it could be just anything. Is it packed or planar?

Yes, only Adobe can help here. Everything else is just guessing.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Jul 08, 2019 Jul 08, 2019

Copy link to clipboard

Copied

I assume that the intended method was to provide a handle "AEIO_SndWorldH" in the interface that actually points to a AEIO_SndWorld structure which has more detailed description of the current format, just like with pixel data. However this neither seems to be implemented nor documented (yet).

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Aug 08, 2019 Aug 08, 2019

Copy link to clipboard

Copied

the sound samples are in "dataPV" and there will be "num_samplesLu" starting at time "start".

you can use AEGP_GetOutSpecSoundSampleSize, AEGP_GetOutSpecSoundChannels, and AEGP_GetOutSpecSoundEncoding with outH to get the bytes per sample, number of channels, and the format the samples are in. the samples will be interleaved.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Aug 11, 2019 Aug 11, 2019

Copy link to clipboard

Copied

I got it working. Thank you.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Contributor ,
Oct 02, 2020 Oct 02, 2020

Copy link to clipboard

Copied

LATEST

Helpful info. Thanks.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines