Jump to content
  • Advertisement
Sign in to follow this  
WizHarD

setlooppoints

This topic is 5056 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

im using directmusic 8 segment. ive loaded a wav file onto it and i want to loop the wav file from two points set in mille seconds. but for somereason setlooppoints does absoulutely nothing. Ive tried setting the length to the length of the file in milleseconds but nothing. Please Please help - i have a deadline tommrow :( thanx in advance Iain

Share this post


Link to post
Share on other sites
Advertisement
Guest Anonymous Poster
Can you post some source code with the problem? SetLoopPoints relies on SetRepeats and/or maybe other parameters that cause this failure with the IDirectMusicSegment interface

Share this post


Link to post
Share on other sites
ok here is the code - i don't know the html stuff your ment to do with it!

if(FAILED(m_pMusicManager->Create3DSegmentFromFile(&m_music,"menu 2.wav"))){return S_OK;}

IDirectMusicSegment8* temp = m_music->GetSegment();
m_music->SetRepeats(2);
long fred = (13 * DMUS_PPQ * 120) / 60; // 13 seconds long
temp->SetLength(fred);
long start = (long)((9125.0f/13075.0f) * (float)fred);
long end = fred;
hr = temp->SetLoopPoints(start,end);
if(hr == DMUS_E_OUT_OF_RANGE){MessageBox(NULL,"","",MB_OK);}
m_music->Play();

I know its horrible - but ive tried everything and just shoved it together. By the way im using mutil.h for performance and segment management

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!