SAL
A C++ library for spatial audio.
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
decoder.h
Go to the documentation of this file.
1 /*
2  decoder
3  Spatial Audio Library (SAL)
4  Copyright (c) 2012, Enzo De Sena
5  All rights reserved.
6 
7  Authors: Enzo De Sena, enzodesena@gmail.com
8 
9  */
10 
11 #ifndef SAL_decoder_h
12 #define SAL_decoder_h
13 
14 #include "audiobuffer.h"
15 #include "vectorop.h"
16 #include "salconstants.h"
17 
18 namespace sal {
19 
20 class Decoder {
21 public:
22  Decoder() {}
23 
28  virtual void Decode(const Buffer& input_buffer,
29  Buffer& output_buffer) = 0;
30 
31 
32  virtual ~Decoder() {}
33 };
34 
35 
36 class IdenticalDecoder : public Decoder {
37 public:
39 
40  virtual void Decode(const Buffer& input_buffer,
41  Buffer& output_buffer) {
42  output_buffer.SetSamples(input_buffer);
43  }
44 
45  virtual ~IdenticalDecoder() {}
46 };
47 
48 } // namespace sal
49 
50 #endif