4 #include "buffer_storage.h"
9 uint
BytesFromFmt(FmtType type
) noexcept
13 case FmtUByte
: return sizeof(uint8_t);
14 case FmtShort
: return sizeof(int16_t);
15 case FmtFloat
: return sizeof(float);
16 case FmtDouble
: return sizeof(double);
17 case FmtMulaw
: return sizeof(uint8_t);
18 case FmtAlaw
: return sizeof(uint8_t);
23 uint
ChannelsFromFmt(FmtChannels chans
, uint ambiorder
) noexcept
27 case FmtMono
: return 1;
28 case FmtStereo
: return 2;
29 case FmtRear
: return 2;
30 case FmtQuad
: return 4;
31 case FmtX51
: return 6;
32 case FmtX61
: return 7;
33 case FmtX71
: return 8;
34 case FmtBFormat2D
: return (ambiorder
*2) + 1;
35 case FmtBFormat3D
: return (ambiorder
+1) * (ambiorder
+1);
36 case FmtUHJ2
: return 2;
37 case FmtUHJ3
: return 3;
38 case FmtUHJ4
: return 4;
39 case FmtSuperStereo
: return 2;