Hi. I'd like to find out what the value returned by LoadSound() represents, if anyone knows (this is for the Windows x64 version of PureBasic). I assume that it's a handle\address pointer to a DirectSound object or buffer?
The reason that I'm asking is that I'm in the middle of porting an OpenAL wrapper library I wrote in BlitzMax to PureBasic and I need to get the buffer pointer, buffer size, sound format ID, etc for a loaded sound so that I can use them with the 'alBufferData' OpenAL command. I'm looking for a way to use the system ID returned by LoadSound() to obtain this information.
What does the value returned by 'LoadSound()' represent?
Re: What does the value returned by 'LoadSound()' represent?
Wouldn't it be easier to simply load the file into a memory buffer?
It is easy to load a WAV file and find the buffer.
If you need other fileformats it gets complicated.
It is easy to load a WAV file and find the buffer.
If you need other fileformats it gets complicated.
Re: What does the value returned by 'LoadSound()' represent?
Yes, the code for a WAV loader seems to be very simple and would give me the details I need to work with OpenAL. I was planning to use that method to convert my OpenAL library for BlitzMax to PureBasic, but now I'm hitting other issues with PureBasic's 3D library that make me think that I'm better off just switching my project back to BlitzMax.
Re: What does the value returned by 'LoadSound()' represent?
I do not know if i do this on the right way. But if you want to know the adress of a loaded sound. But i use the following methode:
*Position is now a memeory pointer to the sound file.
Code: Select all
#My_Sound = 1
Global Position.i
LoadSound(#My_Sound,"The_Sound.wav")
*Position = @#My_Sound
From my first self made computer till now I stil like computers.