Sign in to follow this  

setlooppoints

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

This topic is 4843 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.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this