<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "> Eric, Wow! Thanks for the wealth of leads / info! :)<div><br></div><div> -am looking at the OpenAL example right now. </div><div><br></div><div> As per my note, you gave me just what I needed! :) I simply needed the proper type for 'device' so the ALCdevice* pointer was part of the missing link that the docs didn't mention and I couldn't seem to locate. eek! -either poor docs or my poor lil blonde head! lol! </div><div><br></div><div> anyway, the only issue I have now is the loading / unloading as you also cover in your note. </div><div><br></div><div> I'm actually wanting to stay cross-platform here so I'm thinking I'll use SDL, as the project I'm working on already has SDL support. (I'm trying to use OpenAL for a 'proof-of-concept') as we're not certain if SDL will ultimately perform the way we'd like. </div><div><br></div><div> -Thus my rather haphazard intro to OpenAL! :)</div><div><br></div><div> So, just to be clear, you're saying that there is actually no current way with the default install of OpenAL on Mac to load / unload files using straight OpenAL?… </div><div><br></div><div> Anyway, -one more curious question… </div><div><br></div><div> according to the 1.1 spec, the old alutLoadWAVFile() and alutUnloadWAV() methods seem to be changed to loadWAVFile() and unloadWAV(), respectively. If Apple really is adhering to 1.1 then why in the world aren't these two methods supported?… :) It doesn't make sense to me. </div><div><br></div><div> Also, are these two methods actually still in the alut.h library, even though the names have been changed?… </div><div><br></div><div> Once again, Eric, thanks so very much for your help. You rock!… :)</div><div><br></div><div> Have a terrific weekend!… </div><div><br></div><div>Smiles,</div><div><br></div><div>Cara :)</div><div><div apple-content-edited="true"> <div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><div>---</div><div>View my Online Portfolio at:</div><div><a href="http://www.onemodelplace.com/CaraQuinn">http://www.onemodelplace.com/CaraQuinn</a> </div></span></div></span></div></span></div> </div><br><div><div>On Mar 13, 2009, at 5:40 PM, E. Wing wrote:</div><br class="Apple-interchange-newline"><br><br><div class="gmail_quote">On Fri, Mar 13, 2009 at 3:08 PM, Cara Quinn <span dir="ltr"><<a href="mailto:caraquinn@caraquinn.com">caraquinn@caraquinn.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"> Hello all, -just joined this list, and have a newby question which I'm betting has been asked bunches o' times before. So my apologies in advance! :)<br> <br> I'm working in C++ and am trying to compile a basic OpenAL example via the command line with GCC on a Mac running Leopard 10.6.<br> <br> I'm obviously getting errors having to do with alut.h not being found and thusly, all of the alut functions not being available.<br> <br> NOw, I know that technically alut is no longer supported in OpenAL 1.1 and Apple is adhering to that spec so I'm not surprised I can't compile, but my question is this; What in the world am I to do about it?! :)<br> </blockquote><div><br>Don't use alut :)<br><br>You describe two different reasons you need alut:<br>1) To initialize OpenAL<br>2) To load a WAV file<br><br>For (1), you can do everything with OpenAL directly. You need to open a device, and then create a context in the device you opened to render sound into.<br> <br>So typically (ignoring error checking):<br>ALCdevice* openal_device = alcOpenDevice(NULL);<br>ALCcontext* openal_context = alcCreateContext(openal_device, 0);<br><br>// you may also want to explicitly make the context current to make sure it is active<br> alcMakeContextCurrent(openal_context);<br><br><br>For (2), there are lots of different things you can do.<br>- You can use Core Audio's native audio file loaders<br>- You can go find a 3rd party audio file loader<br>- You can write your own<br> - You can cheat and exploit symbols that are still in Apple's OpenAL framework but are publicly not exposed in headers<br><br>For 3rd party, you have a lot of options. I personally like SDL_sound because it handles a lot of different file formats with a single API and is cross-platform. There is a 3rd party re-implementation of alut you can also use, but it is API/ABI incompatible with Apple's OpenAL framework for technical reasons so you must rename all the function names in the library to use it safely. You can also code directly to a specific codec, e.g. ogg vorbis. I've seem some tutorials that do this with OpenAL.<br> <br>For cheating, you can try to access the old alut symbols in Apple's OpenAL framework. For backwards compatibility, Apple left the old symbols in the framework to not break legacy programs. But this is also the reason the new 3rd party alut isn't compatible. The old alut API was different on every single platform, and the new 3rd party alut has different function signatures so you will get symbol clashes. But if you don't care about cross-platform compatibility or using 3rd party alut, then this is a quick simple hack.<br> <br>So I think I have an example doing this hack to get the LoadWAV function.<br><a href="http://playcontrol.net/ewing/jibberjabber/waveinterference_opengl_sha.html">http://playcontrol.net/ewing/jibberjabber/waveinterference_opengl_sha.html</a><br> (Find the DMG link and download it. The source code is inside.)<br><br>Apple also has a Mac specific OpenAL example found on your hard disk at:<br>/Developer/Examples/CoreAudio/Services/OpenALExample/<br>(assuming default Xcode install)<br> <br>The Apple example will show you the Core Audio file loaders I think.<br><br>- Eric<br></div></div><br></div><br></div></body></html>