pub type PrAudioSampleType = c_uint;Expand description
Audio overview:
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.
Since floats are the only audio format ever passed, there is no variable sample type or bit depth. However, when going back and forth to storage formats, it is necessary to give the user an indication of the sample type in the storage. For this reason, the SDK includes AudioSampleType which defines a variety of possible formats. Note that these are ONLY USED FOR USER INTERFACE!
In general, any audio sample rate is supported. For this reason, we use a floating point number to represent audio sample rates. However, not all rates will evenly divide into our time ticks per second, so for more unusual rates there will be quantization errors possible using PrTime.
The host currently supports 4 audio channels types: mono, stereo, 5.1 and 32 channels. Stereo channel ordering is {kPrAudioChannelLabel_FrontLeft, kPrAudioChannelLabel_FrontRight}. 5.1 channels ordering is {kPrAudioChannelLabel_FrontLeft, // L kPrAudioChannelLabel_FrontRight, // R kPrAudioChannelLabel_FrontCenter, // C kPrAudioChannelLabel_LowFrequency, // LFE kPrAudioChannelLabel_BackLeft, // Ls kPrAudioChannelLabel_BackRight}. // Rs
32 channel ordering is all {kPrAudioChannelLabel_Discrete}