[Openal] ALUT import for different wav formats

Jason Daly jdaly at ist.ucf.edu
Tue Sep 4 08:14:49 PDT 2007


developer at oldunreal.com wrote:
> I used alutLoadWAVMemory for a long time with lil problems so far, but 
> now it is deprectated i had to give alutLoadMemoryFromFileImage a try. 
> But what happened before very rarely - i now get "Unsupported mode 
> within an otherwise usable file type" for filetypes which worked before.
> Seems that not as many formats supported as with the old version.
> As mentioned already, with the old version i had this problem too in 
> very rare cases, but now its even worse.
>
> Did anyone ever think to use something like libsndfile for that?
>
> In any case- what other options do i have to import more than the 
> formats ALUT provides me? I gave libsndfile a look, but it is only 
> designed to convert files, not in memory data. To convert the wav 
> files manually before import is not possible in my case, since its for 
> a game-patch and its impossible for me to re-edit any map or mod to 
> fit the requirements.
>
> Any suggestions are very welcome.
>
> Thx, Smirftsch
>
>
> PS: added an example wav file which fails.
>


According to the header information, that's actually MP3 audio within a 
.wav file.  OpenAL isn't going to be able to support this kind of .wav 
file.  I believe only PCM, u-Law, and A-Law are supported natively by 
ALUT.  Some people have used other formats, like MP3 and Vorbis, by 
first decoding them using the appropriate library, and then streaming 
the decoded audio into an OpenAL source, using buffer queues.


-- 

--"J"

"I'm a castaway stranded in a desolate land,
 I can see the footprints in the virtual sand."
	--Neil Peart



More information about the Openal mailing list