OpenAL
BlitzMax Forums/BlitzMax Programming/OpenAL
| ||
I was wondering if OpenAL let you skip around in a song by clicking on various spots on a time line or something? Thanks. |
| ||
If you mean the BlitzMax driver then no. If you mean OpenAL generally, then I'm not sure, although I also suspect that the answer is again no, as it, like DirectSound, is simply an API to access sound hardware. In order to do what you want, you're probably looking for a sound engine similar to FMod and suchlike. |
| ||
Yes openal can do this (as can directsound), use AL_SAMPLE_OFFSET with the alsourcei function. |
| ||
@REDi: Can you show me an example? I don't think I understand. |
| ||
Hi Ked Do you have MaxGUI? if so I'll knock you up an example using that. |
| ||
Dont worry I've done a little 2D example for ya. |
| ||
I know you asked specifically about OpenAL but, just for fun, I went all native... ...Obviously a bit 'brute force' and inelegant but seems to work reasonably well. |
| ||
REDi, Sorry about not getting back to you sooner. I wasn't able to get on yesterday. I compiled your example and it gave me an "unable to open buffer" error. |
| ||
Interesting, what OS are you on? really this should only happen if LoadAudioSample is returning null, could you try somthing like... EnableOpenALAudio() SetAudioDriver "openal" Local AS:TAudioSample = LoadAudioSample(RequestFile("")) If Not AS RunTimeError("unable to open buffer") Print "Okay." Just to see what happens. |
| ||
I am on Windows XP. I tried that example you posted and it returned "unable to open buffer." |
| ||
Yan's example works when I use the path to the OGG. I've been selecting MP3's. Do they not work with LoadAudioSample? |
| ||
MP3 are license fee bound when you use them in your program (ie have code for load and playback). BM does not support mp3 due to that |
| ||
MP3 are license fee bound when you use them in your program (ie have code for load and playback). BM does not support mp3 due to that But why can I play MP3's using LoadSound if BlitzMax doesn't support it? |
| ||
You can? |
| ||
Yes. |
| ||
I was going to make a music player, so I wasn't going to include MP3's. Would that still need a license? |
| ||
you don't need to play for including MP3. You need to pay to use the technology to decompress them and playbeck them! And music players are actually expensive (compared to games with their around 3000 USD fixed fee per title) |
| ||
I'm looking at getting 3D audio going, as in position/listener, so I was looking for some code to get me started with understanding the OpenAL library and come across the example posted here by REDi. It's not working though. I keep getting "Unhandled exception : Attempt to call uninitialized function pointer" on the following line:alGenBuffers(1, Varptr(This.Buffer) ) I'm using windoze bmax 1.30. I think something has changed in bmax which broke this example. Any help getting this working would be much appreciated. Oh yeah, Happy New Year! Edit - Ok fixed. Helps if I have OpenAL installed. Doh. |