-
Notifications
You must be signed in to change notification settings - Fork 52
Expand file tree
/
Copy pathAmbisonicBase.cpp
More file actions
55 lines (45 loc) · 1.85 KB
/
AmbisonicBase.cpp
File metadata and controls
55 lines (45 loc) · 1.85 KB
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
47
48
49
50
51
52
53
54
55
/*############################################################################*/
/*# #*/
/*# Ambisonic C++ Library #*/
/*# AmbisonicBase - Ambisonic Base #*/
/*# Copyright © 2007 Aristotel Digenis #*/
/*# #*/
/*# Filename: AmbisonicBase.cpp #*/
/*# Version: 0.1 #*/
/*# Date: 19/05/2007 #*/
/*# Author(s): Aristotel Digenis #*/
/*# Licence: MIT #*/
/*# #*/
/*############################################################################*/
#include "AmbisonicBase.h"
#include <assert.h>
namespace spaudio {
AmbisonicBase::AmbisonicBase()
: m_nOrder(0)
, m_b3D(0)
, m_nChannelCount(0)
{
}
unsigned AmbisonicBase::GetOrder()
{
return m_nOrder;
}
bool AmbisonicBase::GetHeight()
{
return m_b3D;
}
unsigned AmbisonicBase::GetChannelCount()
{
return m_nChannelCount;
}
bool AmbisonicBase::Configure(unsigned nOrder, bool b3D, unsigned /*nMisc*/)
{
assert(nOrder <= 3); // Only supports up to 3rd order
if (nOrder > 3)
return false;
m_nOrder = nOrder;
m_b3D = b3D;
m_nChannelCount = OrderToComponents(m_nOrder, m_b3D);
return true;
}
} // namespace spaudio