www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.learn - OpenAL with ogg

reply Charma <Motoko_Kusanagi web.de> writes:
Hello,
I started to try using OpenAL the very first time. (no experience in C++ 
either...) I can't get it to run. Can anyone help me with a sample code 
for D? i have found very few samples on the net but they only work with 
wave and have almost no comments at all so it is impossible for a newbie 
to understand.

Best would be something that loads just one ogg-file from hdisk and 
plays it, that would be enough for the beginning. It would help a lot if 
you could add comments to the code so i can follow up what's happening.
A tutorial for D would help too.

Right now i (try to) use DerelictAL and DerelictOgg. I don't know if 
those are the best "headers". Does anyone know any better ones? Is there 
something in Phobos maybe?!? Websites with tutorials and other help 
would be very good too.

Thanks for any help!

ps: sorry for my bad engrish ;)
Jul 06 2007
parent reply Christian Kamm <kamm.incasoftware shift-at-left-and-remove-this.de> writes:
 Best would be something that loads just one ogg-file from hdisk and
 plays it, that would be enough for the beginning. It would help a lot if
 you could add comments to the code so i can follow up what's happening.
 A tutorial for D would help too.

If your main interest is just playing a sound and not learning the internals of OpenAL, you could try ArcLib's sound module: http://www.dsource.org/projects/arclib/browser/trunk/arc/sound.d It uses the Derelict bindings to OpenAL. Christian
Jul 06 2007
parent reply Clay Smith <clayasaurus gmail.com> writes:
Christian Kamm wrote:
 Best would be something that loads just one ogg-file from hdisk and
 plays it, that would be enough for the beginning. It would help a lot if
 you could add comments to the code so i can follow up what's happening.
 A tutorial for D would help too.

If your main interest is just playing a sound and not learning the internals of OpenAL, you could try ArcLib's sound module: http://www.dsource.org/projects/arclib/browser/trunk/arc/sound.d It uses the Derelict bindings to OpenAL. Christian

I don't know if this helps either, but this http://www.dsource.org/projects/yage/browser/trunk/src/yage/resource/sound.d is the code the above module is based upon, and this site http://www.devmaster.net/articles.php?catID=6 seems to have the best OpenAL tutorials. ~ Clay
Jul 06 2007
parent reply Charma <Motoko_Kusanagi web.de> writes:
Thanks for your answers so far. That sound.d was exactly what i way 
looking for... unfortunatly i can'T get it to work.. I downloaded the 
whole arclib and derelict and copied all files to my main.d-folder and 
tried to compile but it will always fail with a link error with a 
strange error like "EAX=...., EBX=asss" and so on... looks like an 
essembler-error... but i don't know anything about that stuff...

I am very helpless when it is about stuff from dsource.org... the libs 
and stuff they offer always has only very rare or no information about 
how to use it. I never know where to copy the libs to or do i really 
have to build them or not and if so, i have no idea how to and what it 
is good for which ends up for me to always bother my friend to help me out.
Does anyone know how i can just get all my tango, derelict and arclib 
stuff get into the dmd-folders like phobos so that i can access them 
from anywhere?
i already tryed to copy it into the phobos-folder next to the std-folder 
but i always get a "can't read"-error when i do like that... it only 
works when i copy the files into the folder where my source-code is, 
which is extremly bothering and i am sure it is not the correct way...

Also the download-links from the project-page of arclib is not working.. 
i am getting a 404 not found error... only the v1 works. does anyone 
know an alternative source to download the newest version? i usually 
prefer to use the most improved and newest version...

Another question: I use ddbi for access to a mysql-db. for the final 
program to work i always need to copy the libmysql.dll with my 
exe-file.. is there any way to compile without the dll-needed?

Sorry for my big nescience -.-






Clay Smith schrieb:
 Christian Kamm wrote:
 Best would be something that loads just one ogg-file from hdisk and
 plays it, that would be enough for the beginning. It would help a lot if
 you could add comments to the code so i can follow up what's happening.
 A tutorial for D would help too.

If your main interest is just playing a sound and not learning the internals of OpenAL, you could try ArcLib's sound module: http://www.dsource.org/projects/arclib/browser/trunk/arc/sound.d It uses the Derelict bindings to OpenAL. Christian

I don't know if this helps either, but this http://www.dsource.org/projects/yage/browser/trunk/src/yage/resource/sound.d is the code the above module is based upon, and this site http://www.devmaster.net/articles.php?catID=6 seems to have the best OpenAL tutorials. ~ Clay

Jul 06 2007
parent reply Clay Smith <clayasaurus gmail.com> writes:
Hrm that's odd...

This will help with setting up arclib:

http://dmedia.dprogramming.com/?n=Tutorials.ArcIntro

What platform are you on?

~ Clay

Charma wrote:
 Thanks for your answers so far. That sound.d was exactly what i way 
 looking for... unfortunatly i can'T get it to work.. I downloaded the 
 whole arclib and derelict and copied all files to my main.d-folder and 
 tried to compile but it will always fail with a link error with a 
 strange error like "EAX=...., EBX=asss" and so on... looks like an 
 essembler-error... but i don't know anything about that stuff...
 
 I am very helpless when it is about stuff from dsource.org... the libs 
 and stuff they offer always has only very rare or no information about 
 how to use it. I never know where to copy the libs to or do i really 
 have to build them or not and if so, i have no idea how to and what it 
 is good for which ends up for me to always bother my friend to help me out.
 Does anyone know how i can just get all my tango, derelict and arclib 
 stuff get into the dmd-folders like phobos so that i can access them 
 from anywhere?
 i already tryed to copy it into the phobos-folder next to the std-folder 
 but i always get a "can't read"-error when i do like that... it only 
 works when i copy the files into the folder where my source-code is, 
 which is extremly bothering and i am sure it is not the correct way...
 
 Also the download-links from the project-page of arclib is not working.. 
 i am getting a 404 not found error... only the v1 works. does anyone 
 know an alternative source to download the newest version? i usually 
 prefer to use the most improved and newest version...
 
 Another question: I use ddbi for access to a mysql-db. for the final 
 program to work i always need to copy the libmysql.dll with my 
 exe-file.. is there any way to compile without the dll-needed?
 
 Sorry for my big nescience -.-
 
 
 
 
 
 
 Clay Smith schrieb:
 Christian Kamm wrote:
 Best would be something that loads just one ogg-file from hdisk and
 plays it, that would be enough for the beginning. It would help a 
 lot if
 you could add comments to the code so i can follow up what's happening.
 A tutorial for D would help too.

If your main interest is just playing a sound and not learning the internals of OpenAL, you could try ArcLib's sound module: http://www.dsource.org/projects/arclib/browser/trunk/arc/sound.d It uses the Derelict bindings to OpenAL. Christian

I don't know if this helps either, but this http://www.dsource.org/projects/yage/browser/trunk/src/yage/resource/sound.d is the code the above module is based upon, and this site http://www.devmaster.net/articles.php?catID=6 seems to have the best OpenAL tutorials. ~ Clay


Jul 06 2007
parent Charma <Motoko_Kusanagi web.de> writes:
i'm on winXP... I will have a look at the toturial soon, thank you...

maybe this isn't a lokal problem and others have this too?


Charma



Clay Smith schrieb:
 Hrm that's odd...
 
 This will help with setting up arclib:
 
 http://dmedia.dprogramming.com/?n=Tutorials.ArcIntro
 
 What platform are you on?
 
 ~ Clay
 
 Charma wrote:
 Thanks for your answers so far. That sound.d was exactly what i way 
 looking for... unfortunatly i can'T get it to work.. I downloaded the 
 whole arclib and derelict and copied all files to my main.d-folder and 
 tried to compile but it will always fail with a link error with a 
 strange error like "EAX=...., EBX=asss" and so on... looks like an 
 essembler-error... but i don't know anything about that stuff...

 I am very helpless when it is about stuff from dsource.org... the libs 
 and stuff they offer always has only very rare or no information about 
 how to use it. I never know where to copy the libs to or do i really 
 have to build them or not and if so, i have no idea how to and what it 
 is good for which ends up for me to always bother my friend to help me 
 out.
 Does anyone know how i can just get all my tango, derelict and arclib 
 stuff get into the dmd-folders like phobos so that i can access them 
 from anywhere?
 i already tryed to copy it into the phobos-folder next to the 
 std-folder but i always get a "can't read"-error when i do like 
 that... it only works when i copy the files into the folder where my 
 source-code is, which is extremly bothering and i am sure it is not 
 the correct way...

 Also the download-links from the project-page of arclib is not 
 working.. i am getting a 404 not found error... only the v1 works. 
 does anyone know an alternative source to download the newest version? 
 i usually prefer to use the most improved and newest version...

 Another question: I use ddbi for access to a mysql-db. for the final 
 program to work i always need to copy the libmysql.dll with my 
 exe-file.. is there any way to compile without the dll-needed?

 Sorry for my big nescience -.-






 Clay Smith schrieb:
 Christian Kamm wrote:
 Best would be something that loads just one ogg-file from hdisk and
 plays it, that would be enough for the beginning. It would help a 
 lot if
 you could add comments to the code so i can follow up what's 
 happening.
 A tutorial for D would help too.

If your main interest is just playing a sound and not learning the internals of OpenAL, you could try ArcLib's sound module: http://www.dsource.org/projects/arclib/browser/trunk/arc/sound.d It uses the Derelict bindings to OpenAL. Christian

I don't know if this helps either, but this http://www.dsource.org/projects/yage/browser/trunk/src/yage/resource/sound.d is the code the above module is based upon, and this site http://www.devmaster.net/articles.php?catID=6 seems to have the best OpenAL tutorials. ~ Clay



Jul 09 2007