English 中文(简体)
开放式的世界
原标题:alutCreateBufferHelloWorld () in openal
  • 时间:2009-11-07 16:03:34
  •  标签:
  • c++
  • openal

i 我们需要你再次帮助制定公开方案

i) 在一般和大范围规划中是新的; 6月

并且正在从上面第11.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:UsersToshibaDesktopGraduation ProjectOpenALopen AL testEXmiãËÇá79Cpp9.cpp(55) : error C2065: alutCreateBufferHelloWorld : undeclared identifier Error executing cl.exe.

问题所在

致谢

问题回答

要么找不到“alut.h”头盔,在这种情况下,大概会给你造成错误,要么你版本的ALUT太老,因此在APIC中没有<>alutCreateBufferHello World。





相关问题
Undefined reference

I m getting this linker error. I know a way around it, but it s bugging me because another part of the project s linking fine and it s designed almost identically. First, I have namespace LCD. Then I ...

C++ Equivalent of Tidy

Is there an equivalent to tidy for HTML code for C++? I have searched on the internet, but I find nothing but C++ wrappers for tidy, etc... I think the keyword tidy is what has me hung up. I am ...

Template Classes in C++ ... a required skill set?

I m new to C++ and am wondering how much time I should invest in learning how to implement template classes. Are they widely used in industry, or is this something I should move through quickly?

Print possible strings created from a Number

Given a 10 digit Telephone Number, we have to print all possible strings created from that. The mapping of the numbers is the one as exactly on a phone s keypad. i.e. for 1,0-> No Letter for 2->...

typedef ing STL wstring

Why is it when i do the following i get errors when relating to with wchar_t? namespace Foo { typedef std::wstring String; } Now i declare all my strings as Foo::String through out the program, ...

C# Marshal / Pinvoke CBitmap?

I cannot figure out how to marshal a C++ CBitmap to a C# Bitmap or Image class. My import looks like this: [DllImport(@"test.dll", CharSet = CharSet.Unicode)] public static extern IntPtr ...

Window iconification status via Xlib

Is it possible to check with the means of pure X11/Xlib only whether the given window is iconified/minimized, and, if it is, how?

热门标签