setlooppoints

Started by
1 comment, last by WizHarD 19 years, 8 months ago
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
Advertisement
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
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

This topic is closed to new replies.

Advertisement