Page 1 of 1

Primary sound buffer

Posted: Sat Dec 29, 2007 6:40 pm
by Fou-Lu
Hi everybody! :wink:

I recently had problems with sound (explained in this topic)
Well, after some researches I found out I could solve it, but I need the pointer to the primary sound buffer. The code probably looks like this:

Code: Select all

*DD.IDirectDrawSurface7
!EXTRN _PB_DirectX_PrimaryBuffer
!MOV eax,[_PB_DirectX_PrimaryBuffer]
!MOV [p_DD],eax
In that case that retrieves the pointer to the screen's front buffer, which is not what I want. I just wanted to know what's the name of the pointer that PB uses for the sound buffer. Please give me some help!

Posted: Sat Dec 29, 2007 8:24 pm
by superadnim
Can you please tell me how to compile this in 4.10? it won't compile at all. I'd like to help but I don't even know how you got to this code to begin with.

Posted: Sat Dec 29, 2007 8:54 pm
by Fou-Lu
If you make some search in how to get pointers to the DirectX objects that PureBasic uses, you will find some pieces of code like this. This one I posted puts the pointer to the primary video buffer in *DD. It won't work if you haven't initialized the screen yet (InitSprite(), OpenScreen() and so on). :wink: