[vorbis-dev] Skipping with vorbisfile playback using DirectSound

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



Well, my machine is a P4 1.4 gHz, Creative SB live sound card, so I'm
doubting it's my machine (that, and ogg & mp3's play just fine in other
applications).  Using multiple buffers and dividing a single buffer into
sections *should* behave the same (you'd think, anyway).  Right now it's
looking like I'll try implementing the decoding in another thread and cross
my fingers that I won't run into any multithreading issues later (when this
code is integrated into a larger project). :)

    Borut

----- Original Message -----
From: "Chris Parsons" <chris at courtsmart.com>
To: <vorbis-dev at xiph.org>
Sent: Tuesday, September 10, 2002 5:02 PM
Subject: RE: [vorbis-dev] Skipping with vorbisfile playback using
DirectSound

<p>> Sounds like either your machine is too slow or you have some other buffer
> issue.  A decode thread is usually ideal so that data can be decoded
before
> it is needed by the buffer fill operation.  You might be able to get a
> sasifactory solution by increasing the number of buffers and using them in
a
> round-robin fashion 1-2-3-4-1-2-3-4.  Wouldn't do any more than 1/4 sec
per
> buffer.
>
> Cheers,
> Chris
>
> -----Original Message-----
> From: Borut Pfeifer [mailto:borut at whiteknucklegames.com]
> Sent: Tuesday, September 10, 2002 4:57 PM
> To: vorbis-dev at xiph.org
> Subject: [vorbis-dev] Skipping with vorbisfile playback using
> DirectSound
>
>
> 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.
> --- >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