Audio help for Vista
BlitzMax Forums/BlitzMax Programming/Audio help for Vista
| ||
Hi, some people report a delay in sounds in windows Vista (i'm using the default audio commands). I read that it's possible to change the audio driver, on the documentation I found there are OpenAL, DirectSound and FreeAudio. Unfortunately there's not much documentation on how to use these: is it as simple as using SetAudioDriver(...) and keeping the sound commands as they are now or must i use specific commands for these libraries? I saw there are all openAL native commands: is it necessary to use these or is it possible to use the blitzmax ones (loadsound, playsound...) to use openAL? Also, which between OpenAL, DirectSound and FreeAudio do you recommend? Thanks a bunch. |
| ||
The best solution I found is to use OpenAL Software Driver for Vista, FreeAudio for all else. I have code in the codearcs that lets you detect the OS version. And yes, just use SetAudioDriver. Although to use OpenAL Software Driver, you first need to call EnableOpenALAudio(). |
| ||
Thanks, btw do you think OpenAL for XP is fine? |
| ||
Yeah. To be honest I'd pretty much use OpenAL, period. The reason I suggested only using it on Vista is thus; I hit some problems (hardware related) which limited the number of available sound channels, which resulted in some sounds not being played. This only happened when using the OpenAL Hardware driver. The Software Driver didn't have this problem but it did have a slight resource overhead. Working on the assumption that any PC capable of running Vista wouldn't have a problem with giving up an extra bit of CPU time, I opted for OpenAL on Vista only. FreeAudio and DirectSound had issues of their own on Vista, at the time, so it made sense to use something else for Vista, and FreeAudio for everything else. I don't know if these problems have been resolved either by BRL or via driver updates (Not sure what was causing the problem in the first place). |
| ||
Thanks again. Is OpenAL installed with Vista or do i need to provide the library somehow? |
| ||
Its just a couple of DLLs that you should keep in your program folder with the EXE. Vista doesn't include OpenAL as standard. |
| ||
Which does beg the question -- is there any way for BlitzMax to use an incbinned DLL without needing to save it to disk first? |
| ||
Don't think so. But if your game starts dumping DLLs all over the place at runtime, its going to send certain anti-virus programs to DefCon 1. |