-
Notifications
You must be signed in to change notification settings - Fork 5
/
iris_formats.hpp
46 lines (41 loc) · 1023 Bytes
/
iris_formats.hpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
// Copyright (c) 2017-2018 Skylark Wireless LLC
// SPDX-License-Identifier: BSD-3-Clause
#pragma once
#include <cstddef>
#include <string>
enum StreamFormat
{
SF_UNDEFINED,
SF_CS8_x1_WIRE16,
SF_CS16_x1_WIRE16,
SF_CF32_x1_WIRE16,
SF_CS12_x1_WIRE24,
SF_CS16_x1_WIRE24,
SF_CF32_x1_WIRE24,
SF_CS16_x1_WIRE32,
SF_CS8_x2_WIRE32,
SF_CS16_x2_WIRE32,
SF_CF32_x2_WIRE32,
SF_CS12_x2_WIRE48,
SF_CS16_x2_WIRE48,
SF_CF32_x2_WIRE48,
SF_CS16_x2_WIRE64,
SF_CF32_x2_WIRE64,
};
void resolveFormats(
const size_t numChannels,
const std::string &localFormat,
const std::string &requestedWireFormat,
StreamFormat &localFormatOut,
std::string &remoteFormatOut,
size_t &bytesPerElement);
void convertToHost(
const StreamFormat format,
const void *inBuff,
void * const *outBuffs,
const size_t numSamples);
void convertToWire(
const StreamFormat format,
const void * const *inBuffs,
void *outBuff,
const size_t numSamples);