What does the value returned by 'LoadSound()' represent?

Advanced game related topics
Axeman
User
User
Posts: 47
Joined: Mon Nov 03, 2003 5:34 am

What does the value returned by 'LoadSound()' represent?

Post by Axeman »

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.
infratec
Always Here
Always Here
Posts: 5422
Joined: Sun Sep 07, 2008 12:45 pm
Location: Germany

Re: What does the value returned by 'LoadSound()' represent?

Post by infratec »

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.
Axeman
User
User
Posts: 47
Joined: Mon Nov 03, 2003 5:34 am

Re: What does the value returned by 'LoadSound()' represent?

Post by Axeman »

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.
Post Reply