Primary sound buffer

Just starting out? Need help? Post your questions and find answers here.
User avatar
Fou-Lu
Enthusiast
Enthusiast
Posts: 201
Joined: Tue Jul 12, 2005 8:30 am
Location: I'm pretty sure this is all a nightmare
Contact:

Primary sound buffer

Post 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!

~Fou-Lu (aka Lørd Cinneris (actually Elias Sant'Ana))

Image Image
superadnim
Enthusiast
Enthusiast
Posts: 480
Joined: Thu Jul 27, 2006 4:06 am

Post 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.
User avatar
Fou-Lu
Enthusiast
Enthusiast
Posts: 201
Joined: Tue Jul 12, 2005 8:30 am
Location: I'm pretty sure this is all a nightmare
Contact:

Post 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:

~Fou-Lu (aka Lørd Cinneris (actually Elias Sant'Ana))

Image Image
Post Reply