From 2a66c0ea9a16c1a3e38cc96683b7cd173b3c3bbd Mon Sep 17 00:00:00 2001 From: bwmott Date: Mon, 17 Feb 2003 05:09:21 +0000 Subject: [PATCH] Updated the fragment size and the high water mark for the sample queue so that sound works better under Windows NT/2000/XP systems. git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@165 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba --- stella/src/ui/dos/SndDOS.cxx | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/stella/src/ui/dos/SndDOS.cxx b/stella/src/ui/dos/SndDOS.cxx index 4b07822f2..f761bde77 100644 --- a/stella/src/ui/dos/SndDOS.cxx +++ b/stella/src/ui/dos/SndDOS.cxx @@ -8,12 +8,12 @@ // SS SS tt ee ll ll aa aa // SSSS ttt eeeee llll llll aaaaa // -// Copyright (c) 1995-2002 by Bradford W. Mott +// Copyright (c) 1995-2003 by Bradford W. Mott // // See the file "license" for information on usage and redistribution of // this file, and for a DISCLAIMER OF ALL WARRANTIES. // -// $Id: SndDOS.cxx,v 1.2 2002-11-13 03:47:55 bwmott Exp $ +// $Id: SndDOS.cxx,v 1.3 2003-02-17 05:09:21 bwmott Exp $ //============================================================================ #include "SndDOS.hxx" @@ -23,7 +23,7 @@ // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - SoundDOS::SoundDOS(bool activate) : myCurrentVolume(100), - myFragmentSize(1024), + myFragmentSize(2048), myIsInitializedFlag(false), myUpdateLock(false), myIsMuted(false), @@ -143,9 +143,9 @@ void SoundDOS::updateSound(MediaSource& mediaSource) mySampleQueue.enqueue(buffer, size); } - // Block until the sound interrupt has consumed all but 125 milliseconds + // Block until the sound interrupt has consumed all but 142 milliseconds // of the available audio samples - uInt32 leave = mySampleRate / 8; + uInt32 leave = mySampleRate / 7; while(mySampleQueue.size() > leave) { }