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

command.h (366B)


      1 #pragma once
      2 
      3 #include <cstdint>
      4 #include <string>
      5 
      6 namespace bridgeLib
      7 {
      8 	template<size_t N, std::enable_if_t<N == 5, void*> = nullptr>
      9 	constexpr uint32_t cmd(const char (&_cmd)[N])
     10 	{
     11 		return (static_cast<uint32_t>(_cmd[0]) << 24) |
     12 			(static_cast<uint32_t>(_cmd[1]) << 16) |
     13 			(static_cast<uint32_t>(_cmd[2]) << 8) |
     14 			(static_cast<uint32_t>(_cmd[3]));
     15 	}
     16 }