Jump to content
  • Advertisement
Sign in to follow this  
Moriquendi

[ogg] Playing .ogg - udeclared identifier

This topic is 3260 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hey. To date, I used OpenAL to play wav files. But now, I want to play .ogg files. So: I found this article (it's no english, but the code is here the most important) http://zenedith.wordpress.com/2008/08/28/play-music-vorbis-ogg-openal/ So I copied it but my program don't compile.
Quote:
Error 206 error C2065: 'ALCcontext' : undeclared identifier Error 207 error C2065: 'pContext' : undeclared identifier Error 208 error C2664: 'alcOpenDevice' : cannot convert parameter 1 from 'const char *' to 'const ALubyte *' Error 209 error C2065: 'pContext' : undeclared identifier Error 210 error C2065: 'pContext' : undeclared identifier
Why?? What .libs should I add to my project? Does a project need any other files to be added? Do you know where I can find working Visual studio 2008 sample? [Edited by - Moriquendi on October 16, 2009 1:38:21 PM]

Share this post


Link to post
Share on other sites
Advertisement
Have you set up the include paths the way I _believe_ the article tells you? I've never used the official OpenAL sdk, only OpeaAL-soft, but my headers are usually located at <AL/al.h> instead of <al.h>. Does your error list include a "file not found" error?

Share this post


Link to post
Share on other sites
Quote:
Original post by Gage64
Did you copy the code exactly as it is? Did you make any kind of changes to it?


Yea, I make few changes but it doesn't metter.
When I use original code I recive the same errors.
All errors:

Quote:

Error 206 error C2664: 'alcIsExtensionPresent' : cannot convert parameter 2 from 'const char [20]' to 'ALubyte *'
Error 207 error C2065: 'ALC_DEVICE_SPECIFIER' : undeclared identifier
Error 208 error C3861: 'alcGetString': identifier not found
Error 209 error C2065: 'ALC_DEFAULT_DEVICE_SPECIFIER' : undeclared identifier
Error 210 error C3861: 'alcGetString': identifier not found
Error 211 error C2065: 'ALCcontext' : undeclared identifier
Error 212 error C2065: 'pContext' : undeclared identifier
Error 213 error C2664: 'alcOpenDevice' : cannot convert parameter 1 from 'const char *' to 'const ALubyte *'
Error 214 error C2065: 'pContext' : undeclared identifier
Error 215 error C2065: 'pContext' : undeclared identifier
Error 216 error C2065: 'pContext' : undeclared identifier
Error 217 error C2065: 'pContext' : undeclared identifier
Error 231 error C3861: 'main_ogg': identifier not found



I think I added all .h files. I don't recive any errors "No file found".
But I'm not sure about .lib files. But it couldn't cause these error I guess.

Edit2:
"OpenAL SDK and OpenAL - soft" - what's the difference? ;P

==============================================================
Edit3:
Yea, and here's more intresting thing.
There werent't these definiction in header files.
For example I couldn't find ALC_DEVICE_SPECIFIER in alc.h
so I downloaded OpenAL SDK and replace old alc.h with new alc.h.
And now...more errors. But not the same:

Quote:

Error 202 error C2371: 'ALCdevice' : redefinition; different basic types C:\Program Files\Microsoft Visual Studio 9.0\VC\include\AL\alctypes.h 5
Error 214 error C2733: second C linkage of overloaded function 'alcCreateContext' not allowed
Error 215 error C2733: second C linkage of overloaded function 'alcMakeContextCurrent' not allowed C:\Program Files\Microsoft Visual Studio 9.0\VC\include\alc.h 38
Error 216 error C2733: second C linkage of overloaded function 'alcProcessContext' not allowed C:\Program Files\Microsoft Visual Studio 9.0\VC\include\alc.h 44
Error 217 error C2733: second C linkage of overloaded function 'alcSuspendContext' not allowed C:\Program Files\Microsoft Visual Studio 9.0\VC\include\alc.h 50
Error 218 error C2733: second C linkage of overloaded function 'alcDestroyContext' not allowed C:\Program Files\Microsoft Visual Studio 9.0\VC\include\alc.h 52
Error 219 error C2733: second C linkage of overloaded function 'alcGetError' not allowed C:\Program Files\Microsoft Visual Studio 9.0\VC\include\alc.h 54
Error 220 error C2556: 'void *alcGetCurrentContext(void)' : overloaded function differs only by return type from 'ALCcontext *alcGetCurrentContext(void)' C:\Program Files\Microsoft Visual Studio 9.0\VC\include\alc.h 56
Error 221 error C2371: 'alcGetCurrentContext' : redefinition; different basic types C:\Program Files\Microsoft Visual Studio 9.0\VC\include\alc.h 56
Error 222 error C2733: second C linkage of overloaded function 'alcOpenDevice' not allowed
Error 223 error C2556: 'void alcCloseDevice(ALCdevice *)' : overloaded function differs only by return type from 'ALCboolean alcCloseDevice(ALCdevice *)' C:\Program Files\Microsoft Visual Studio 9.0\VC\include\alc.h 59
Error 224 error C2371: 'alcCloseDevice' : redefinition; different basic types C:\Program Files\Microsoft Visual Studio 9.0\VC\include\alc.h 59
Error 225 error C2733: second C linkage of overloaded function 'alcIsExtensionPresent' not allowed
Error 226 error C2733: second C linkage of overloaded function 'alcGetProcAddress' not allowed
Error 227 error C2733: second C linkage of overloaded function 'alcGetEnumValue' not allowed
Error 228 error C3861: 'alcCloseDevice': identifier not found
Error 229 error C2668: 'alcMakeContextCurrent' : ambiguous call to overloaded function
Error 230 error C3861: 'alcCloseDevice': identifier not found
Error 244 error C3861: 'main_ogg': identifier not found



[Edited by - Moriquendi on October 16, 2009 2:39:21 PM]

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!