Mach1 Spatial SDK
Loading...
Searching...
No Matches
Mach1DecodeCAPI.h
1// Mach1 Spatial SDK
2// Copyright © 2017 Mach1. All rights reserved.
3
4#pragma once
5
6#include "Mach1Point3D.h"
7#include "Mach1Point4D.h"
8
9#if defined(Mach1DecodeCore_h) || defined(Mach1EncodeCore_h) || defined(Mach1PositionalCore_h) || defined(Mach1TranscodeCore_h) || defined(Mach1AudioTimelineCore_h)
10# ifndef M1_API
11# if defined(_WINDOWS) || defined(_WIN32)
12# define M1_API __declspec(dllexport)
13# else
14# define M1_API
15# endif
16# endif
17#else
18# ifndef M1_API
19# if !defined(M1_STATIC) && (defined(_WINDOWS) || defined(_WIN32))
20# define M1_API __declspec(dllimport)
21# else
22# define M1_API
23# endif
24# endif
25#endif
26
27enum Mach1PlatformType {
28 Mach1PlatformDefault = (int)0,
29 Mach1PlatformUnity,
30 Mach1PlatformUE,
31 Mach1PlatformOfEasyCam,
32 Mach1PlatformAndroid,
33 Mach1PlatformiOS,
34 Mach1PlatformiOSTableTop_ZVertical,
35 Mach1PlatformiOSPortraitHandheld_YVertical,
36 Mach1PlatformiOSPortrait_YawOnly
37};
38
39enum Mach1DecodeMode {
40 M1DecodeSpatial_4 = (int)0,
41 M1DecodeSpatial_8,
42 M1DecodeSpatial_14,
43};
44
45#ifdef __cplusplus
46extern "C" {
47#endif
48M1_API void *Mach1DecodeCAPI_create();
49M1_API void Mach1DecodeCAPI_delete(void *M1obj);
50
51M1_API void Mach1DecodeCAPI_setDecodeMode(void *M1obj, enum Mach1DecodeMode mode);
52M1_API void Mach1DecodeCAPI_setPlatformType(void *M1obj, enum Mach1PlatformType platformType);
53
54M1_API enum Mach1DecodeMode Mach1DecodeCAPI_getDecodeMode(void *M1obj);
55M1_API enum Mach1PlatformType Mach1DecodeCAPI_getPlatformType(void *M1obj);
56
57M1_API void Mach1DecodeCAPI_decode(void *M1obj, float Yaw, float Pitch, float Roll, float *result, int bufferSize, int sampleIndex);
58M1_API void Mach1DecodeCAPI_decodeCoeffs(void *M1obj, float *result, int bufferSize, int sampleIndex);
59M1_API void Mach1DecodeCAPI_decodePannedCoeffs(void *M1obj, float *result, int bufferSize, int sampleIndex, bool applyPanLaw);
60M1_API void Mach1DecodeCAPI_decodeCoeffsUsingTranscodeMatrix(void *M1obj, float *matrix, int channels, float *result, int bufferSize, int sampleIndex);
61
62M1_API void Mach1DecodeCAPI_setFilterSpeed(void *M1obj, float filterSpeed);
63M1_API int Mach1DecodeCAPI_getFormatChannelCount(void *M1obj);
64M1_API int Mach1DecodeCAPI_getFormatCoeffCount(void *M1obj);
65M1_API void Mach1DecodeCAPI_setRotation(void *M1obj, Mach1Point3D newRotationFromMinusOnetoOne);
66M1_API void Mach1DecodeCAPI_setRotationDegrees(void *M1obj, Mach1Point3D newRotationDegrees);
67M1_API void Mach1DecodeCAPI_setRotationRadians(void *M1obj, Mach1Point3D newRotationRadians);
68M1_API void Mach1DecodeCAPI_setRotationQuat(void *M1obj, Mach1Point4D newRotationQuat);
69
70M1_API long Mach1DecodeCAPI_getCurrentTime(void *M1obj);
71M1_API long Mach1DecodeCAPI_getLastCalculationTime(void *M1obj);
72
73M1_API char *Mach1DecodeCAPI_getLog(void *M1obj);
74
75M1_API Mach1Point3D Mach1DecodeCAPI_getCurrentAngle(void *M1obj);
76#ifdef __cplusplus
77}
78#endif
Definition Mach1Point3D.h:17
Definition Mach1Point4D.h:15