Jump to content
  • Advertisement
Sign in to follow this  

RE: WLOOP in DirectMusic

This topic is 3647 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I know this was a somewhat old thread, however, I never actually saw a usable solution for the problem posted online anywhere. I figured I might post a fix in case it might be useful. http://www.gamedev.net/community/forums/topic.asp?topic_id=376714 My error: C:/bin/DXSDK/include/dmdls.h:81: error: declaration of `WLOOP _DMUS_REGION::WLOOP[1]' C:/bin/DXSDK/include/dls1.h:264: error: changes meaning of `WLOOP' from `typedef struct _rloop WLOOP' I'm using the latest MinGW on WindowsXP. WLOOP is typedef'ed in dls1.h as: typedef struct _rloop { ULONG cbSize; ULONG ulType; /* Loop Type */ ULONG ulStart; /* Start of loop in samples */ ULONG ulLength; /* Length of loop in samples */ } WLOOP, FAR *LPWLOOP; A structure in dmdls.h uses the WLOOP type in a struct as: typedef struct _DMUS_REGION { RGNRANGE RangeKey; RGNRANGE RangeVelocity; USHORT fusOptions; USHORT usKeyGroup; ULONG ulRegionArtIdx; ULONG ulNextRegionIdx; /* If zero no more regions */ ULONG ulFirstExtCkIdx; WAVELINK WaveLink; WSMPL WSMP; WLOOP WLOOP[1]; } DMUS_REGION; It seems MinGW doesn't like the member variable with the same name as the type. I changed the delcaration to the actual type rather than the typedef'ed alias: // WLOOP WLOOP[1]; struct _rloop WLOOP[1]; I don't believe this will cause problems for existing code. Changing the member name would also work though existing (source) code referencing that field would break. Hope this helps. Thanks, Dave.

Share this post

Link to post
Share on other sites
Sign in to follow this  

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!