Re: Directx 9 audio
- From: Tommi Laukkanen <TommiLaukkanen@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Wed, 29 Mar 2006 02:22:01 -0800
You can do something like this if you use DirectSound Managed API:
BufferPlayFlags flags = BufferPlayFlags.Looping;
sound.SecondaryBuffer.SetCurrentPosition(0);
sound.SecondaryBuffer.Play(0, flags);
I am not familiar with AudioVideoPlayback so unfortunately I can not be of
help with it.
best regards,
Tommi Laukkanen
"Sid Price" wrote:
Yes the files are ready for looping and were used previously in a different.
(third party) sequencer that worked very well. I notice, even with a file
just a few seconds long the same delay between end and restart of the sound
with my AudioVideoPlayback.Audio class implementation.
When using AudioVideoPlayback.Audio there is no auto-looping I think. I am
responding to the "ending" event and restarting the WAV file.
Sid.
"Tommi Laukkanen" <Tommi Laukkanen@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in
message news:1D61B22E-06AB-4EB9-9BF3-36560BD1C0C7@xxxxxxxxxxxxxxxx
Hello Sid,
have you prepared your sound files properly for looping? I think you need
to
do some mixing magic to get the sound to loop properly even in a wav
editor
application. When they seem to play fine there they should play ok in the
DirectX too. If I recall correctly you can select whether to loop or not
if
you use DirectSoundAPI to play your wav files.
best regards,
Tommi
"Sid Price" wrote:
I have an application that sequences WAV files, it is written using VB
.NET
2003. I am using the AudioVideoPlayback Audio class to play the WAV files
and it does pretty much everything I need in a very simple way. The only
issue I have is that some of the files need to loop seemlessly and using
the
"Ending" event and resetting the current position seems to have a glitch
or
a delay that causes a glitch in the sound played back. I have searched
but
can not find any samples, other than the ones that do exactley what I am
doing, for avoiding this problem. I think the issue may be that the files
being looped are quite large (running around 3 minutes) and that this
simple
looping technique is just not fast enough.
Please can someone advise if this approach can be made to work? If not is
there a good sample of streaming WAV files using managed code (vb.net).
Many thanks,
Sid.
- Follow-Ups:
- Re: Directx 9 audio
- From: Sid Price
- Re: Directx 9 audio
- References:
- Directx 9 audio
- From: Sid Price
- Re: Directx 9 audio
- From: Sid Price
- Directx 9 audio
- Prev by Date: Re: Where is the TextureLoader class?
- Next by Date: Re: Where is the TextureLoader class?
- Previous by thread: Re: Directx 9 audio
- Next by thread: Re: Directx 9 audio
- Index(es):
Relevant Pages
|