YSE sound engine  1.0
cross platform sound engine
 All Classes Namespaces Functions Pages
deviceInterface.hpp
1 /*
2  ==============================================================================
3 
4  device.hpp
5  Created: 10 Apr 2014 2:43:14pm
6  Author: yvan
7 
8  ==============================================================================
9 */
10 
11 #ifndef DEVICEINTERFACE_HPP_INCLUDED
12 #define DEVICEINTERFACE_HPP_INCLUDED
13 #include <string>
14 #include <vector>
15 #include "../classes.hpp"
16 #include "../yse.hpp"
17 
18 // TODO: this should be removed at some point. We don't want any juce references in the public interface
19 namespace juce {
20  class AudioIODevice;
21 }
22 
23 namespace YSE {
24  namespace DEVICE {
25 
26  class API interfaceObject {
27  public:
28  interfaceObject(juce::AudioIODevice * pimpl);
29 
30  const char * getName() const;
31  const char * getTypeName() const;
32 
33  const std::vector<std::string> & getOutputChannelNames() const;
34  const std::vector<std::string> & getInputChannelNames() const;
35  const std::vector<double> & getAvailableSampleRates() const;
36  const std::vector<int> & getAvailableBufferSizes() const;
37  int getDefaultBufferSize() const;
38  int getOutputLatency() const;
39  int getInputLatency() const;
40 
41  private:
42  std::vector<std::string> outputChannelNames;
43  std::vector<std::string> inputChannelNames;
44  std::vector<double> sampleRates;
45  std::vector<int> bufferSizes;
46 
47  juce::AudioIODevice * pimpl;
48 
49  friend class DEVICE::managerObject;
50  };
51  }
52 
53 
54 }
55 
56 
57 
58 #endif // DEVICE_HPP_INCLUDED