microphonedevicedriver.h

来自「一个语言识别引擎」· C头文件 代码 · 共 69 行

H
69
字号
// -*- mode:C++; tab-width:4; c-basic-offset:4; indent-tabs-mode:nil -*-

/*
 * Copyright (C) 2006 Paul Fitzpatrick
 * CopyPolicy: Released under the terms of the GNU GPL v2.0.
 *
 */

#ifndef __MicrophoneDeviceDriverh__
#define __MicrophoneDeviceDriverh__

#include <yarp/dev/DeviceDriver.h>
#include <yarp/dev/AudioGrabberInterfaces.h>

namespace yarp {
    namespace dev {
        class MicrophoneDeviceDriver;
    }
}

/**
 * @ingroup dev_impl
 *
 * A basic microphone input source.
 * The implementation is very simple right now - if you want to
 * use this for real you should fix it up.
 *
 */
class yarp::dev::MicrophoneDeviceDriver : 
    public IAudioGrabberSound, public DeviceDriver
{
private:
	MicrophoneDeviceDriver(const MicrophoneDeviceDriver&);
	void operator=(const MicrophoneDeviceDriver&);

public:
	/**
	 * Constructor.
	 */
	MicrophoneDeviceDriver();

	/**
	 * Destructor.
	 */
	virtual ~MicrophoneDeviceDriver();

    /**
	 * Open the device driver.
     * @param config parameters for the device driver
	 * @return returns true on success, false on failure.
	 */
    virtual bool open(yarp::os::Searchable& config);

	/**
	 * Closes the device driver.
	 * @return returns true/false on success/failure.
	 */
	virtual bool close(void);

    virtual bool getSound(yarp::sig::Sound& sound);

protected:
	void *system_resources;
    int dsp;
};


#endif

⌨️ 快捷键说明

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