⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 directionspecificstreamparameters.hxx

📁 贡献一个基于osip协议栈的用户代理
💻 HXX
字号:
#ifndef INCLUDED_PORTAUDIO_SINGLEDIRECTIONSTREAMPARAMETERS_HXX
#define INCLUDED_PORTAUDIO_SINGLEDIRECTIONSTREAMPARAMETERS_HXX

// ---------------------------------------------------------------------------------------

#include <cstddef>

#include "portaudio.h"

#include "portaudiocpp/System.hxx"
#include "portaudiocpp/SampleDataFormat.hxx"

// ---------------------------------------------------------------------------------------

// Forward declaration(s):
namespace portaudio
{
	class Device;
}

// ---------------------------------------------------------------------------------------

// Declaration(s):
namespace portaudio
{

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

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

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

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

		void setSuggestedLatency(PaTime latency);

		void setHostApiSpecificStreamInfo(void *streamInfo);

		// Accessor methods:
		PaStreamParameters *paStreamParameters();
		const PaStreamParameters *paStreamParameters() const;

		Device &device() const;
		int numChannels() const;

		SampleDataFormat sampleFormat() const;
		bool isSampleFormatInterleaved() const;
		bool isSampleFormatHostApiSpecific() const;
		PaSampleFormat hostApiSpecificSampleFormat() const;

		PaTime suggestedLatency() const;

		void *hostApiSpecificStreamInfo() const;
	
	private:
		PaStreamParameters paStreamParameters_;
	};


} // namespace portaudio

// ---------------------------------------------------------------------------------------

#endif // INCLUDED_PORTAUDIO_SINGLEDIRECTIONSTREAMPARAMETERS_HXX

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -