To check out this repository please hg clone the following URL, or open the URL using EasyMercurial or your preferred Mercurial client.

The primary repository for this project is hosted at https://github.com/sonic-visualiser/sv-dependency-builds .
This repository is a read-only copy which is updated automatically every hour.

Statistics Download as Zip
| Branch: | Tag: | Revision:

root / src / portaudio_20161030_catalina_patch / bindings / cpp / include / portaudiocpp / DirectionSpecificStreamParameters.hxx @ 164:9fa11135915a

History | View | Annotate | Download (2.24 KB)

1
#ifndef INCLUDED_PORTAUDIO_SINGLEDIRECTIONSTREAMPARAMETERS_HXX
2
#define INCLUDED_PORTAUDIO_SINGLEDIRECTIONSTREAMPARAMETERS_HXX
3

    
4
// ---------------------------------------------------------------------------------------
5

    
6
#include <cstddef>
7

    
8
#include "portaudio.h"
9

    
10
#include "portaudiocpp/System.hxx"
11
#include "portaudiocpp/SampleDataFormat.hxx"
12

    
13
// ---------------------------------------------------------------------------------------
14

    
15
// Forward declaration(s):
16
namespace portaudio
17
{
18
	class Device;
19
}
20

    
21
// ---------------------------------------------------------------------------------------
22

    
23
// Declaration(s):
24
namespace portaudio
25
{
26

    
27
	//////
28
	/// @brief All parameters for one direction (either in or out) of a Stream. Together with 
29
	/// parameters common to both directions, two DirectionSpecificStreamParameters can make up 
30
	/// a StreamParameters object which contains all parameters for a Stream.
31
	//////
32
	class DirectionSpecificStreamParameters
33
	{
34
	public:
35
		static DirectionSpecificStreamParameters null();
36

    
37
		DirectionSpecificStreamParameters();
38
		DirectionSpecificStreamParameters(const Device &device, int numChannels, SampleDataFormat format, 
39
			bool interleaved, PaTime suggestedLatency, void *hostApiSpecificStreamInfo);
40

    
41
		// Set up methods:
42
		void setDevice(const Device &device);
43
		void setNumChannels(int numChannels);
44

    
45
		void setSampleFormat(SampleDataFormat format, bool interleaved = true);
46
		void setHostApiSpecificSampleFormat(PaSampleFormat format, bool interleaved = true);
47

    
48
		void setSuggestedLatency(PaTime latency);
49

    
50
		void setHostApiSpecificStreamInfo(void *streamInfo);
51

    
52
		// Accessor methods:
53
		PaStreamParameters *paStreamParameters();
54
		const PaStreamParameters *paStreamParameters() const;
55

    
56
		Device &device() const;
57
		int numChannels() const;
58

    
59
		SampleDataFormat sampleFormat() const;
60
		bool isSampleFormatInterleaved() const;
61
		bool isSampleFormatHostApiSpecific() const;
62
		PaSampleFormat hostApiSpecificSampleFormat() const;
63

    
64
		PaTime suggestedLatency() const;
65

    
66
		void *hostApiSpecificStreamInfo() const;
67
	
68
	private:
69
		PaStreamParameters paStreamParameters_;
70
	};
71

    
72

    
73
} // namespace portaudio
74

    
75
// ---------------------------------------------------------------------------------------
76

    
77
#endif // INCLUDED_PORTAUDIO_SINGLEDIRECTIONSTREAMPARAMETERS_HXX