X-Git-Url: https://git.carlh.net/gitweb/?a=blobdiff_plain;ds=sidebyside;f=src%2Fsound_frame.h;h=72ab5925c13a510ba991225a84f393b0a667b7ac;hb=0bbb2e9c99845ce7b6056048356a9710119cdbd9;hp=2b78c8e1d1116ae2e4ad600c838882d919e8ecfc;hpb=eb772d227c378e17c99b5d609b81d0cc4b664d2c;p=libdcp.git diff --git a/src/sound_frame.h b/src/sound_frame.h index 2b78c8e1..72ab5925 100644 --- a/src/sound_frame.h +++ b/src/sound_frame.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2012-2014 Carl Hetherington + Copyright (C) 2012-2021 Carl Hetherington This file is part of libdcp. @@ -31,20 +31,43 @@ files in the program, then also delete it here. */ + /** @file src/sound_frame.h - * @brief SoundFrame class. + * @brief SoundFrame class */ + #ifndef LIBDCP_SOUND_FRAME_H #define LIBDCP_SOUND_FRAME_H + #include "frame.h" #include + namespace dcp { -typedef Frame SoundFrame; + +class SoundFrame : public Frame +{ +public: + SoundFrame (ASDCP::PCM::MXFReader* reader, int n, std::shared_ptr c, bool check_hmac); + int channels () const; + int samples () const; + + int bits() const { + return _bits; + } + + int32_t get (int channel, int sample) const; + +private: + int _channels; + int _bits; +}; + } + #endif