diff options
author | Chris Robinson <[email protected]> | 2021-04-27 08:26:42 -0700 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2021-04-27 08:26:42 -0700 |
commit | ff380298e4086490584707b8ffde44c5ad64830f (patch) | |
tree | 313288fbfdc2ea7824508e85d264966db6078368 /alc/buffer_storage.cpp | |
parent | 99157f149f180cfcc2e4be6a3d2a54843411e87a (diff) |
Move BufferStorage and Voice to core
Diffstat (limited to 'alc/buffer_storage.cpp')
-rw-r--r-- | alc/buffer_storage.cpp | 41 |
1 files changed, 0 insertions, 41 deletions
diff --git a/alc/buffer_storage.cpp b/alc/buffer_storage.cpp deleted file mode 100644 index 3eb1e28a..00000000 --- a/alc/buffer_storage.cpp +++ /dev/null @@ -1,41 +0,0 @@ - -#include "config.h" - -#include "buffer_storage.h" - -#include <cstdint> - - -uint BytesFromFmt(FmtType type) noexcept -{ - switch(type) - { - case FmtUByte: return sizeof(uint8_t); - case FmtShort: return sizeof(int16_t); - case FmtFloat: return sizeof(float); - case FmtDouble: return sizeof(double); - case FmtMulaw: return sizeof(uint8_t); - case FmtAlaw: return sizeof(uint8_t); - } - return 0; -} - -uint ChannelsFromFmt(FmtChannels chans, uint ambiorder) noexcept -{ - switch(chans) - { - case FmtMono: return 1; - case FmtStereo: return 2; - case FmtRear: return 2; - case FmtQuad: return 4; - case FmtX51: return 6; - case FmtX61: return 7; - case FmtX71: return 8; - case FmtBFormat2D: return (ambiorder*2) + 1; - case FmtBFormat3D: return (ambiorder+1) * (ambiorder+1); - case FmtUHJ2: return 2; - case FmtUHJ3: return 3; - case FmtUHJ4: return 4; - } - return 0; -} |