Jump to content
  • Advertisement
Sign in to follow this  
javapimp

RE: WLOOP in DirectMusic

This topic is 3700 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
Advertisement
Sign in to follow this  

  • Advertisement
×

Important Information

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

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!