我正在尝试创建一个支持 windows phone 8 的运行时组件。我有一个 c++ 源代码,目前它不支持 windows phone 8,所以我将它们转换为 windows phone 运行时组件以使其与窗户电话。
现在的问题是我创建了它们,但在下面显示错误,
#pragma once
#include "Encoder.h"
namespace YakPRT
{
public ref class YakPRTComponent sealed
{
public:
YakPRTComponent();
void yakEncode(paTestData *yakData, uint8_t *rawData, int rawDataSize);
void EncodeData(paTestData *yakData, uint8_t *rawData, int rawDataSize);
void signalHandler( int signum );
int yakRecordCallback( const void *inputBuffer, void *outputBuffer,
unsigned long framesPerBuffer,
const StreamCallbackTimeInfo* timeInfo,
StreamCallbackFlags statusFlags,
void *userData );
PaError yakAudioStreamOpen(paTestData *yakData);
PaError yakAudioStreamStart(paTestData *yakData);
PaError isYakAudioStreamNotStopped(paTestData *yakData);
PaError yakCloseAudioStream(paTestData *yakData);
private:
Encoder *_encoder;
};
}
来自上述代码的以下错误,
错误 C3987:“yakEncode”:公共成员的签名包含本机类型“paTestData *”
错误 C3992:“getYakCodec”:公共成员的签名包含无效类型
注意:paTestData 是一个结构体,
typedef struct
{
int frameIndex; /* Index into sample array. */
FILE *recFileStream; /* Record the stream into File */
uint8_t *encoderOutput;
int allocOutputSize; /* memory size allocated */
int encoderOutputSize;
PaStream *recordStream; /* PaStream opened to record Audio callback. */
AVContext *c;
} paTestData;
我不擅长 c++,有人可以告诉我这个错误是什么,以及如何纠正这个错误。.