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

Premiere Pro SDK Audio Buffers

Community Beginner ,
Jun 03, 2017 Jun 03, 2017

Copy link to clipboard

Copied

Hi all! I'm trying to work with my audio channels and buffers using the PrSDKAudioSuite, which tells me this:

// All audio calls to and from Premiere use arrays of buffers of 32-bit

// floats to pass audio. Therefore all audio is not interleaved by channel.

// So stereo audio looks like this:

//

// float* audio[2];

//

// where audio[0] is the address of a buffer N samples long and audio[1]

// is the address of a second buffer N samples long. audio[0] contains

// the left channel and audio[1] contains the right channel. N is called

// the number of "sample frames" in the buffer. N will be the same no matter

// how many channels of audio are present in the buffer.

//

// Because we use 32-bit floats for each audio sample, we can represent

// values above 0 dB during mixing. 0 dB corresponds to +/- 1.0 in the floating

// point. For symmetry in the int <--> float conversions, it is recommended

// you use the utility functions below.  For example if you want to convert

// a single float to a 16-bit signed int, use ConvertAndInterleaveTo16BitInteger()

// with 1 channel and one sample frame.

I do have the buffers as the float, but they all seem to stay NULL. Is there something i'm missing or doing wrong? Hope somebody can point me into the right direction.

Thank you,
Bas

TOPICS
SDK

Views

759

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
Advisor ,
Jun 05, 2017 Jun 05, 2017

Copy link to clipboard

Copied

Hi Bas,

Are you developing an exporter?  What does your timeline look like?  Code snippets?

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
Community Beginner ,
Jun 05, 2017 Jun 05, 2017

Copy link to clipboard

Copied

LATEST

Hi Zac, thanks for your reply!

We're working on a transmitter actually, and we started working from the provided Transmitter Example. Various data is being sent to the hardware device we're working on, like the project- and sequence settings for example. We're not sending actual video frames.

The timeline is pretty basic and for testing purposes only: a layer of video and a stereo audio track.

As for the code snippets, we started out with the provided example which creates the buffers here

TransmitterPlugin.cpp

for (int i = 0; i < AUDIO_BUFFER_MAX_CHANNELS; i++) {

     mAudioBuffers = new float[AUDIO_BUFFER_SIZE];

}

This should create the buffers of 32-bit floats we're looking for as stated in PrSDKAudioSuite.h. We've acquired the PrSDKAudioSuite to interleave the data but the floats in mAudioBuffers don't seem to update when the playhead is moving and all float data stays at 0. I'm also trying to use the getAudio in PrSDKSequenceAudioSuite.h but i can't quite seem to get it to work.

PrSDKSequenceAudioSuite.h

// Audio is returned as arrays of uninterleaved floats. InBuffer must point to n buffers of floats

  // inFrameCount long, where n is the number of channels. This always returns the next contiguous

  // chunk of audio sample frames.

  prSuiteError (*GetAudio)(

  csSDK_uint32 inAudioRenderID,

  csSDK_uint32 inFrameCount,

  float** inBuffer,

  char inClipAudio);

I hope this helps, hopefully i'm overlooking something.

Thanks again,
Bas

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