41 #include <asdcp/AS_DCP.h>
49 SoundFrame::SoundFrame (ASDCP::PCM::MXFReader* reader,
int n, std::shared_ptr<const DecryptionContext> c,
bool check_hmac)
50 :
Frame<ASDCP::PCM::MXFReader, ASDCP::PCM::FrameBuffer> (reader, n, c, check_hmac)
52 ASDCP::PCM::AudioDescriptor desc;
53 reader->FillAudioDescriptor (desc);
54 _channels = desc.ChannelCount;
59 SoundFrame::get (
int channel,
int frame)
const
61 uint8_t
const * d = data() + (frame * _channels * 3) + (channel * 3);
63 return (d[0] << 8 | (d[1] << 16) | (d[2] << 24)) >> 8;
68 SoundFrame::channels ()
const
75 SoundFrame::samples ()
const
77 return size() / (_channels * 3);
Namespace for everything in libdcp.