diff options
author | Daniil Cherednik <dan.cherednik@gmail.com> | 2016-01-06 01:11:29 +0300 |
---|---|---|
committer | Daniil Cherednik <dan.cherednik@gmail.com> | 2016-01-06 01:11:29 +0300 |
commit | f7dbae4af76e76cb53ab34a7e9a16d78b83c6841 (patch) | |
tree | f7015a8771d0fb5afa844c4766915e0b41393f81 /src/compressed_io.h | |
parent | 20fa89e476bb32ae8ae8ebf80b58001ffb325c94 (diff) | |
download | atracdenc-f7dbae4af76e76cb53ab34a7e9a16d78b83c6841.tar.gz |
refactoring:
some changes to get possibility to create alternative
compression algorithms and use different containers.
Diffstat (limited to 'src/compressed_io.h')
-rw-r--r-- | src/compressed_io.h | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/compressed_io.h b/src/compressed_io.h new file mode 100644 index 0000000..9999f43 --- /dev/null +++ b/src/compressed_io.h @@ -0,0 +1,16 @@ +#pragma once +#include <vector> +#include <array> +#include <string> + +template<int FRAME_SZ> +class ICompressedIO { +public: + typedef std::array<char, FRAME_SZ> TFrame; + virtual void WriteFrame(std::vector<char> data) = 0; + virtual std::unique_ptr<TFrame> ReadFrame() = 0; + virtual std::string GetName() const = 0; + virtual int GetChannelNum() const = 0; + virtual long long GetLengthInSamples() const = 0; + virtual ~ICompressedIO() {} +}; |