![]() |
| [[ Home | Forums | 3D Engines Database | Wiki | Articles/Tutorials | Game Dev Jobs | IRC Chat Network | Contact Us ]] |
|
|
#1 |
|
DevMaster Editor
Join Date: Jan 2005
Posts: 54
|
OpenAL Lesson 1: Single Static Source
Author:: Jesse Maurais Description: The simplest OpenAL program involving only one non-moving source. Post your discussions/comments here by clicking on Add Reply. |
|
|
|
|
|
#2 |
|
DevMaster Staff
Join Date: Jan 2003
Location: Mars
Posts: 1,141
|
It looks all screwed up on my screen. The text is OK, but the code is black on black :/
___________________________________________
baldurk He who knows not and knows that he knows not is ignorant. Teach him. He who knows not and knows not that he knows not is a fool. Shun him. |
|
|
|
|
|
#3 |
|
Senior Member
Join Date: Jan 2003
Location: ON, Canada
Posts: 524
|
hmmm, It's looks good to me... Maybe it's because your using linux?
___________________________________________
"What ever happened to happily ever after?" |
|
|
|
|
|
#4 |
|
DevMaster Staff
Join Date: Jan 2003
Posts: 1,201
|
baldurk: very strange. Anyone else having the same problems?
|
|
|
|
|
|
#5 |
|
Senior Member
Join Date: Jan 2003
Location: East Coast, USA
Posts: 370
|
same here!
conio! NOoo... ![]()
___________________________________________
Imagine. |
|
|
|
|
|
#6 |
|
DevMaster Staff
Join Date: Jan 2003
Location: Mars
Posts: 1,141
|
I'll bet good money that it's non HTML compliant code, which IE renders incorrectly, but it looks good :/
___________________________________________
baldurk He who knows not and knows that he knows not is ignorant. Teach him. He who knows not and knows not that he knows not is a fool. Shun him. |
|
|
|
|
|
#7 |
|
DevMaster Staff
Join Date: Apr 2003
Location: Germany
Posts: 2,328
|
same here ( i use mozilla-firebird ). the text is ok but black on black code.
___________________________________________
If Prolog is the answer, what is the question ? |
|
|
|
|
|
#8 |
|
DevMaster Staff
Join Date: Apr 2003
Location: Germany
Posts: 2,328
|
and sure enough it looks fine with IE.
___________________________________________
If Prolog is the answer, what is the question ? |
|
|
|
|
|
#9 |
|
DevMaster Staff
Join Date: Jan 2003
Posts: 1,201
|
ok...its fixed now. Let me know if there are any other problems.
|
|
|
|
|
|
#10 |
|
DevMaster Staff
Join Date: Apr 2003
Location: Germany
Posts: 2,328
|
looks good now. what did you do to fix it ?
___________________________________________
If Prolog is the answer, what is the question ? |
|
|
|
|
|
#11 |
|
DevMaster Staff
Join Date: Jan 2003
Posts: 1,201
|
just changed some minor syntax errors
![]() Its strange that IE still parsed those errors correctly. |
|
|
|
|
|
#13 |
|
New Member
Join Date: Oct 2003
Posts: 4
|
Hello, I've been following up the tutorials and seeing how the programs work. And I tried to assign a different position for the source by modifying the line
ALfloat SourcePos[] = { 0.0, 0.0, 0.0 }; hoping that I would hear the 'FancyPants' sound from some other place. But it didn't work. Is there anything else I should have changed also? Am I missing something...? |
|
|
|
|
|
#14 |
|
New Member
Join Date: Jun 2003
Posts: 24
|
If you want to change a source's position, you must ensure that your source is mono(1 channel). The FancyPants.wav is a stereo sound file(2 channels) and thus, you cannot change it's position.
|
|
|
|
|
|
#15 |
|
New Member
Join Date: Oct 2003
Posts: 4
|
Grrrr...that was it. I overlooked that part. Thanks a lot
![]() |
|
|
|
|
|
#16 |
|
New Member
Join Date: Jul 2004
Posts: 1
|
Hi,
I'm trying to compile the source with MinGW and getting severals errors : Linking... Warning: .drectve `-defaultlib:uuid.lib ' unrecognized Warning: .drectve `-defaultlib:uuid.lib ' unrecognized D:\Office\MinGWStudio\Lib\alut.lib(.\Release\ALut. obj.B)(.text+0x6):C:\Documents and S: undefined reference to `alcOpenDevice' D:\Office\MinGWStudio\Lib\alut.lib(.\Release\ALut. obj.B)(.text+0xe):C:\Documents and S: undefined reference to `alcCreateContext' D:\Office\MinGWStudio\Lib\alut.lib(.\Release\ALut. obj.B)(.text+0x14):C:\Documents and S: undefined reference to `alcMakeContextCurrent' D:\Office\MinGWStudio\Lib\alut.lib(.\Release\ALut. obj.B)(.text+0x3):C:\Documents and S: undefined reference to `alcGetCurrentContext' D:\Office\MinGWStudio\Lib\alut.lib(.\Release\ALut. obj.B)(.text+0xb):C:\Documents and S: undefined reference to `alcGetContextsDevice' D:\Office\MinGWStudio\Lib\alut.lib(.\Release\ALut. obj.B)(.text+0x14):C:\Documents and S: undefined reference to `alcMakeContextCurrent' D:\Office\MinGWStudio\Lib\alut.lib(.\Release\ALut. obj.B)(.text+0x1a):C:\Documents and S: undefined reference to `alcDestroyContext' D:\Office\MinGWStudio\Lib\alut.lib(.\Release\ALut. obj.B)(.text+0x20):C:\Documents and S: undefined reference to `alcCloseDevice' I used the newest SDK from creative and added the openal32 and alut libs. Did i set up something wrong ? |
|
|
|
|
|
#17 |
|
DevMaster Staff
Join Date: Apr 2003
Location: Germany
Posts: 2,328
|
i don't know... what's the library format used by mingw ?
___________________________________________
If Prolog is the answer, what is the question ? |
|
|
|
|
|
#18 | |
|
New Member
Join Date: Aug 2004
Posts: 3
|
Quote:
Your undefined reference errors are coming from a bug in ld. You must include the libraries in a specific order on the command line - libALut.a must be specified before libOpenAL32.a (i.e. -lALut -lOpenAL32). The other warnings - "Warning: .drectve `-defaultlib:uuid.lib ' unrecognized" - I am still trying to figure out. I have Googled around to no avail, but I suspect the problem is incompatible MS libs with MinGW32 (despite the fact I am also using an OpenAL package suited specifically for MinGW!). Does anyone else know the meaning of this .drectve warning, or - even better - how to fix it? - Xiroxium |
|
|
|
|
|
|
#19 |
|
Senior Member
Join Date: Jan 2003
Location: Switzerland
Posts: 1,333
|
you can't use ms .lib's, you need some convertor.. i don't know where you get one, i just know i had to use one once..
___________________________________________
davepermen.net -Loving a Person is having the wish to see this Person happy, no matter what that means to yourself. -No matter what it means to myself.... |
|
|
|
|
|
#20 |
|
New Member
Join Date: Nov 2004
Posts: 1
|
hi
i am pretty sure i have done everything in the tutorial but i cant get the sound to play for me not a single source would play .... well i only have a single source i know the functions are working coz when i press 1 to play the sound, it does out put "1 pessed ..... playing source" where could i be screwing it i wonder any ideas ???? thanks z |
|
|
|
|
|
#21 |
|
New Member
Join Date: Oct 2005
Posts: 4
|
Hi, I've read this tutorial and I've been trying to understand it..I'm a beginner at programming but I just want to play a dedicated wav file through this, similar to the tutorial. I can open the project in VC6++, and I can see the main.cpp file with all the coding. Why is it that when I compile and build and run the program, typing "p" or whatever doesn't do anything, while running the lesson1.exe file initially, without any changes works fine and I hear "hello mr. fancy pants" I can't seem to see the solution to this and have been messing around with it for quite some time now. I have a WAV file which I wanna be played in the same manner as hello mr. fancy pants..can anyone help me please. Thank you
|
|
|
|
|
|
#22 |
|
New Member
Join Date: Jan 2006
Location: Chile
Posts: 14
|
Hello, I changed the code so now It sounds. I added a context inicialization and a alternative exit function. The new code goes after the //NEW:.
I hope this will help you. Code:
|
|
|
|
|
|
#23 |
|
New Member
Join Date: Apr 2006
Location: lincoln
Posts: 1
|
hi
im new to all this programming stuff I got the above code but I get the error: --------------------Configuration: main - Win32 Debug-------------------- Linking... main.obj : error LNK2001: unresolved external symbol __imp__alutUnloadWAV main.obj : error LNK2001: unresolved external symbol __imp__alutLoadWAVFile main.obj : error LNK2001: unresolved external symbol __imp__alutExit main.obj : error LNK2001: unresolved external symbol __imp__alutInit Debug/main.exe : fatal error LNK1120: 4 unresolved externals Error executing link.exe. main.exe - 5 error(s), 0 warning(s) -------------------------------------------------------------------------- can any one tell me what it means and how i can fix it Thanx AC ![]() |
|
|
|
|
|
#24 |
|
Senior Member
Join Date: Oct 2005
Location: Pensacola, FL
Posts: 1,028
|
Are you linking to the ALUT library?
|
|
|
|
|
|
#25 |
|
New Member
Join Date: May 2006
Location: Spain
Posts: 10
|
Where´s the ALUT library?
I have only found the OpenAL32.lib in the OpenAL folder. |
|
|
|
![]() |
| Thread Tools | Search this Thread |
| Display Modes | |
|