[directmusic] Re: Segment Looping Problem

  • From: "Scott Morgan (Volt)" <a-smorg@xxxxxxxxxxxxx>
  • To: <directmusic@xxxxxxxxxxxxx>
  • Date: Tue, 21 Oct 2003 11:13:25 -0700

I don't know how to do this in programming, but I do know that you need
to set the loop points of the actual wave and not the segment for it to
work.

Here's the best way I can think of to do it:

1. Make a really really long blank segment(so it never needs to loop)

2.  Create a wavetrack and add the wave to the wave track.

3. Set the length of the wave (not the wave file, the DMusic wave) to
the same length as the segment.

4. Make the wave a looping wave.

5. Set the loop points on the wave.

This was all done in DirectMusicProducer, so I'm not sure how it works
on the programming level.  It sounds like a rough ride if you have to
create an IStream object to set the data.  Keep in mind DMusic is
designed to give the composer the control, not the programmer so much.
It's usually a lot easier to create the content in Producer and then
load/play it in your app instead of trying to create it on the fly.
Unless you are doing things programmatically for a reason (like making a
sequencing app or something very specialized) I would recommend using
Producer. =20


-Scott Morgan

This posting is provided "AS IS" with no warranties, and confers no
rights.


-----Original Message-----
From: directmusic-bounce@xxxxxxxxxxxxx
[mailto:directmusic-bounce@xxxxxxxxxxxxx] On Behalf Of MAXX
Sent: Tuesday, October 21, 2003 7:06 AM
To: directmusic@xxxxxxxxxxxxx
Subject: [directmusic] Segment Looping Problem

Hi,

i am loading a wave file using loader interface of directmusic and with
the=20
following code trying to set it to loop correctly but something is wrong

whatever i use as loop points via SetLoopPoints command it still loops
from=20
end to beginning. Any ideas?

Thanks.

Code :

-------------------------------------------------------

MUSIC_TIME length =3D (48 * DMUS_PPQ * 120) / 60;

pSegment->SetLength(length); // Wave is 48 seconds

pSegment->SetRepeats(DMUS_SEG_REPEAT_INFINITE);

pSegment->SetLoopPoints(length/2,length); // Just to loop from end to
middle

-------------------------------------------------------

_________________________________________________________________
Protect your PC - get McAfee.com VirusScan Online=20
http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3D3963





Other related posts: