VVSDK  1.0
The VVAmbisonic Library
AmbiFormat.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2013 David McGriffy, all rights reserved
3  */
4 
5  #ifndef AMBIFORMAT_H_INCLUDED
6  #define AMBIFORMAT_H_INCLUDED
7 
12 {
13 public:
14 
15  enum {
18  };
19 
20  AmbiFormat();
21  ~AmbiFormat();
23  static inline float ambiFormat2Parm(int fmt) { return (float)fmt/(NUM_FORMATS - 1); }
24  static inline int parm2AmbiFormat(float x) { return (int)(x * (NUM_FORMATS - 1)); }
25 
26  static void reformat(float** ptr, int inFormat, int outFormat, int order, int sampleFrames);
28 private:
29  static const int NUM_FORMATS = 2;
30  static const int NUM_COEFS = 4;
31 
32  static const float coef[NUM_FORMATS][NUM_COEFS];
33  static const int chanNum[NUM_FORMATS][NUM_COEFS]; // gives channel in the format given acn
34 };
35 
36 #endif
static int parm2AmbiFormat(float x)
Definition: AmbiFormat.h:24
static void reformat(float **ptr, int inFormat, int outFormat, int order, int sampleFrames)
Definition: AmbiFormat.cpp:18
AmbiFormat()
Definition: AmbiFormat.cpp:10
Definition: AmbiFormat.h:17
static float ambiFormat2Parm(int fmt)
Definition: AmbiFormat.h:23
Definition: AmbiFormat.h:11
Definition: AmbiFormat.h:16
~AmbiFormat()
Definition: AmbiFormat.cpp:14