Borut Pfeifer
2002-Sep-10 13:57 UTC
[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@xiph.org' containing only the word 'unsubscribe' in the body. No subject is needed. Unsubscribe messages sent to the list will be ignored/filtered.
Ryan Wellman
2002-Sep-10 18:11 UTC
[vorbis-dev] Skipping with vorbisfile playback using DirectSound
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@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@xiph.org' containing only the word 'unsubscribe' in the body. No subject is needed. Unsubscribe messages sent to the list will be ignored/filtered.
ChristianHJW
2002-Sep-10 23:35 UTC
[vorbis-dev] Re: Skipping with vorbisfile playback using DirectSound
Borut Pfeifer" <borut@whiteknucklegames.com> schrieb im Newsbeitrag news:005001c2590c$ae6b9180$9000a8c0@borut...> I'm having a problem trying to write a simple vorbis file player using > DirectSound. The decoding portion is pretty much straight from thewhy dont you use the existing Dshow filter from Tobias Waldvogel ( http://tobias.everwicked.com ) or Ingo Ralf Blum ( http://sf.net/projects/mediaxw ) ? -- Christian Sites : http://mcf.sourceforge.net http://sf.net/projects/mcf MCF mailing lists : news://news.gmane.org gmane.comp.video.mcf.general gmane.comp.video.mcf.devel gmane.comp.video.mcf.mplayer gmane.comp.video.mcf.announce gmane.comp.video.mcf.mpc Soon : www.corecodec.com " <p><p><p>--- >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@xiph.org' containing only the word 'unsubscribe' in the body. No subject is needed. Unsubscribe messages sent to the list will be ignored/filtered.