gearmulator

Emulation of classic VA synths of the late 90s/2000s that are based on Motorola 56300 family DSPs
Log | Files | Refs | Submodules | README | LICENSE

wavReader.h (595B)


      1 #pragma once
      2 
      3 #include <cstdint>
      4 #include <string>
      5 #include <vector>
      6 
      7 namespace synthLib
      8 {
      9 	struct CuePoint
     10 	{
     11 		size_t sampleOffset;
     12 		std::string name;
     13 
     14 		bool operator < (const CuePoint& _other) const
     15 		{
     16 			return sampleOffset < _other.sampleOffset;
     17 		}
     18 	};
     19 
     20 	struct Data
     21 	{
     22 		const void* data = nullptr;
     23 		size_t dataByteSize = 0;
     24 		uint32_t bitsPerSample = 0;
     25 		uint32_t channels = 0;
     26 		uint32_t samplerate = 0;
     27 		bool isFloat = false;
     28 	};
     29 
     30 	class WavReader
     31 	{
     32 	public:
     33 		static bool load(Data& _data, std::vector<CuePoint>* _cuePoints, const uint8_t* _buffer, size_t _bufferSize);
     34 	};
     35 };