0

openal をプログラミングする際に、またあなたの助けが必要です

私は一般的にプログラミングの初心者です >>そして、VC++ 6 でオープンを学び始めます

そして、sdk1.1に添付されているドキュメントから学んでいます

そして、このプログラムを持っています

#include <conio.h>
#include <stdlib.h>
#include <stdio.h>
#include <al.h>
#include <alc.h>
#include <alut.h>
#pragma comment(lib, "openal32.lib")
#pragma comment(lib, "alut.lib")


 ALCdevice *alcOpenDevice(ALCdevice *device);


 ALCenum alcGetError( ALCdevice *device );



 ALuint buffer ;
ALuint source;

// Position of the source sound.
ALfloat SourcePos[] = { 0.0, 0.0, 0.0 };

// Velocity of the source sound.
ALfloat SourceVel[] = { 0.0, 0.0, 0.0 };


// Position of the Listener.
ALfloat ListenerPos[] = { 0.0, 0.0, 0.0 };

// Velocity of the Listener.
ALfloat ListenerVel[] = { 0.0, 0.0, 0.0 };

// Orientation of the Listener. (first 3 elements are "at", second 3 are "up")
// Also note that these should be units of '1'.
ALfloat ListenerOri[] = { 0.0, 0.0, -1.0,  0.0, 1.0, 0.0 };



int  main()
{




alGenSources(1,&source);








 alSourcei (source, AL_BUFFER,  alutCreateBufferHelloWorld ());  

    alSourcef (source, AL_PITCH,    10.0      );
    alSourcef (source, AL_GAIN,     10.0      );
    //alSourcefv(source, AL_POSITION, SourcePos);
    //alSourcefv(source, AL_VELOCITY, SourceVel);
//  alSourcei (source, AL_LOOPING,  loop     );


alSourcePlay(source);


 alDeleteSources(1, &source);
return 0;

};

エラーが発生しました

C:\Users\Toshiba\Desktop\Graduation Project\OpenAL\open AL test\EX\mi\ãËÇá\7\9\Cpp9.cpp(55) : error C2065: 'alutCreateBufferHelloWorld' : undeclared identifier cl.exe の実行中にエラーが発生しました。

そして、私は何が問題なのかわかりません

ありがとう

4

1 に答える 1

1

alut.h ヘッダーの検索に失敗している可能性があります。この場合、エラーが発生する可能性があります。または、ALUT のバージョンが古すぎalutCreateBufferHelloWorldて API に含まれていません。

于 2009-11-07T16:30:58.053 に答える