[vorbis-dev] Skipping with vorbisfile playback using DirectSound

Borut Pfeifer borut at whiteknucklegames.com
Wed Sep 11 08:17:26 PDT 2002



I'm ahead of you on that one - I already use DSBCAPS_GETCURRENTPOSITION2
(although the possibility exists that I'm writing to the wrong place when
streaming in .ogg files, but not .wavs, which I will look into).  What size
buffer did you use?

   Borut

----- Original Message -----
From: "Ryan Wellman" <firestar at eskimo.com>
To: <vorbis-dev at xiph.org>
Sent: Tuesday, September 10, 2002 9:11 PM
Subject: Re: [vorbis-dev] Skipping with vorbisfile playback using
DirectSound

<p>> When I first tried implementing something like this I had a similar
> problem (some sound cards it would happen with more than others).  In any
> case it came down to the fact that play cursor was getting reported in odd
> (and highly inaccurate) locations.  Adding the following flags when
> creating the bufferdesc DSBCAPS_GETCURRENTPOSITION2 moved it closer to
> where I was expecting it.  Although we did end up dividing our buffer into
> thirds just to be safe. :)
>
> Ryan
>
> On Tue, 10 Sep 2002, Borut Pfeifer wrote:
>
> > I'm having a problem trying to write a simple vorbis file player using
> > DirectSound. The decoding portion is pretty much straight from the
> > vorbisfile sample code.  The pcm data gets put into one half of a
> > DirectSound buffer, and as that half is playing, the next half gets
filled.
> > The problem is, there's skipping and some noise when the file is being
> > played (although some of the music is audible). Could this this caused
by
> > the time spent decoding? Wav files work fine so I'm fairly certain it's
not
> > the playback code itself. I've tried decoding various amounts at one
time
> > but in each case the same thing occurs (although to different degrees).
Is
> > there something I can do to fix this without adding a separate decoding
> > thread (or is that going to be necessary)? Or could it be something
else?
> >
> > Thanks,
> >   Borut
> >
> > --- >8 ----
> > List archives:  http://www.xiph.org/archives/
> > Ogg project homepage: http://www.xiph.org/ogg/
> > To unsubscribe from this list, send a message to
'vorbis-dev-request at xiph.org'
> > containing only the word 'unsubscribe' in the body.  No subject is
needed.
> > Unsubscribe messages sent to the list will be ignored/filtered.
> >
>
> -----BEGIN GEEK CODE BLOCK-----
> Version: 3.1
> GS d+ s++: a-- C++ UL++ P+ L+ E(----) W++ N++ o? K? w+(--) !O M- !V PS+@
> PE+ Y++ PGP t* 5++ X R tv+(-) b+ DI(+) D+ G++ e+++++> h! r%(--) y?
> ------END GEEK CODE BLOCK------
>
> --- >8 ----
> List archives:  http://www.xiph.org/archives/
> Ogg project homepage: http://www.xiph.org/ogg/
> To unsubscribe from this list, send a message to
'vorbis-dev-request at xiph.org'
> containing only the word 'unsubscribe' in the body.  No subject is needed.
> Unsubscribe messages sent to the list will be ignored/filtered.
>

--- >8 ----
List archives:  http://www.xiph.org/archives/
Ogg project homepage: http://www.xiph.org/ogg/
To unsubscribe from this list, send a message to 'vorbis-dev-request at xiph.org'
containing only the word 'unsubscribe' in the body.  No subject is needed.
Unsubscribe messages sent to the list will be ignored/filtered.



More information about the Vorbis-dev mailing list