Re: Directx 9 audio



Thank you for taking the time to respond again, however unless I am totally
misunderstanding the code you wrote and the documentation your sample code
will only play short files. It uses a static secondary buffer. In order to
play long files (like the several minute files I have) one must use a
streamimg buffer. I was trying to avoid this by using the AudioVideoPlayback
API, it does pretty much what you described with the exception that tere is
the "glitch" I mentioned in my original post.

In the absense of any other input I guess I am going to have to code a
streaming buffer version using the DirectSound API.

Thanks,
Sid.

"Tommi Laukkanen" <TommiLaukkanen@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in
message news:40B799B7-AE15-406C-BEB4-6B2DC9B6DEC6@xxxxxxxxxxxxxxxx
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.









.



Relevant Pages

  • Custom sounds dont work
    ... So I am goofy and want my Vista Ultimate to play my own wav files ... the sound menu... ...
    (microsoft.public.windows.vista.music_pictures_video)
  • Re: Directx 9 audio
    ... Yes the files are ready for looping and were used previously in a different ... just a few seconds long the same delay between end and restart of the sound ... When they seem to play fine there they should play ok in the ... I am using the AudioVideoPlayback Audio class to play the WAV files ...
    (microsoft.public.win32.programmer.directx.managed)
  • Re: Sound Problem
    ... It doesn't play automatically there. ... it automatically plays sound without launching Windows Media Player. ... .mp3 files and also individual selected .wav files played launch Windows ...
    (microsoft.public.windowsxp.general)
  • Unable to play wav files
    ... Windows Xp will not play wav files such as the startup and shutdown wav ... I have reinstalled my sound driver to no avail. ... the play button is grayed out and another wav file player ...
    (microsoft.public.windowsxp.help_and_support)
  • Re: Shostakovichs 8th symphony?
    ... but the PSO simply doesn't have enough sound and impact ... They play very well, but they just don't have a very impactful ... playing style. ... the conductors who shape the sound of the orchestra. ...
    (rec.music.classical.recordings)