diff -r -c --new-file sidplay-base-1.0.4/audio/oss/audiodrv.cpp sidplay-base-1.0.4-agenda/audio/oss/audiodrv.cpp *** sidplay-base-1.0.4/audio/oss/audiodrv.cpp Sun Apr 11 06:00:00 1999 --- sidplay-base-1.0.4-agenda/audio/oss/audiodrv.cpp Mon May 21 01:39:08 2001 *************** *** 15,20 **** --- 15,21 ---- // Reset everything. errorString = "None"; frequency = 0; + volume = 255; channels = 0; encoding = 0; precision = 0; *************** *** 191,199 **** { perror(AUDIODEVICE); errorString = "AUDIO: Could not get audio_buf_info."; ! return false; ! } ! fragments = myAudInfo.fragstotal; //cout << "fragsize = " << (int)myAudInfo.fragsize << endl; //cout << "bytes = " << (int)myAudInfo.bytes << endl; --- 192,200 ---- { perror(AUDIODEVICE); errorString = "AUDIO: Could not get audio_buf_info."; ! // return false; ! } else ! fragments = myAudInfo.fragstotal; //cout << "fragsize = " << (int)myAudInfo.fragsize << endl; //cout << "bytes = " << (int)myAudInfo.bytes << endl; *************** *** 213,218 **** --- 214,221 ---- void audioDriver::Play(ubyte* pBuffer, int bufferSize) { + sword *tp; + long t; if (audioHd != (-1)) { if (swapEndian) *************** *** 222,227 **** --- 225,238 ---- ubyte tmp = pBuffer[n+0]; pBuffer[n+0] = pBuffer[n+1]; pBuffer[n+1] = tmp; + } + } + if (volume != 255) + { + for (tp=(sword *)pBuffer; tp>8); } } write(audioHd,pBuffer,bufferSize); diff -r -c --new-file sidplay-base-1.0.4/audio/oss/audiodrv.h sidplay-base-1.0.4-agenda/audio/oss/audiodrv.h *** sidplay-base-1.0.4/audio/oss/audiodrv.h Sun Apr 11 06:00:00 1999 --- sidplay-base-1.0.4-agenda/audio/oss/audiodrv.h Mon May 21 00:16:54 2001 *************** *** 55,60 **** --- 55,70 ---- return frequency; } + udword GetVolume() + { + return volume; + } + + udword SetVolume(udword v) + { + return volume=v; + } + int GetChannels() { return channels; *************** *** 102,107 **** --- 112,118 ---- int fragSizeBase; udword frequency; + udword volume; // These are constants/enums from ``libsidplay/include/emucfg.h''. int encoding; diff -r -c --new-file sidplay-base-1.0.4/configure sidplay-base-1.0.4-agenda/configure *** sidplay-base-1.0.4/configure Wed May 31 20:52:45 2000 --- sidplay-base-1.0.4-agenda/configure Fri May 11 19:43:14 2001 *************** *** 1010,1021 **** my_ldflags_save=$LDFLAGS my_libs_save=$LIBS ! CXXFLAGS="$CXXFLAGS $my_sidplay_incadd" LDFLAGS="$LDFLAGS $my_sidplay_libadd" LIBS="-lsidplay" cat > conftest.$ac_ext < int main() { --- 1010,1022 ---- my_ldflags_save=$LDFLAGS my_libs_save=$LIBS ! CXXFLAGS="$CXXFLAGS -I/usr/mipsel-linux/include/g++ $my_sidplay_incadd" LDFLAGS="$LDFLAGS $my_sidplay_libadd" LIBS="-lsidplay" cat > conftest.$ac_ext < #include "confdefs.h" #include int main() { *************** *** 1175,1181 **** { echo "configure: error: SIDPLAY library and/or headers found not found. Please check your installation! ! " 1>&2; exit 1; }; fi echo $ac_n "checking how to run the C++ preprocessor""... $ac_c" 1>&6 --- 1176,1184 ---- { echo "configure: error: SIDPLAY library and/or headers found not found. Please check your installation! ! " 1>&2; ! #exit 1; ! }; fi echo $ac_n "checking how to run the C++ preprocessor""... $ac_c" 1>&6 diff -r -c --new-file sidplay-base-1.0.4/sidplay.cpp sidplay-base-1.0.4-agenda/sidplay.cpp *** sidplay-base-1.0.4/sidplay.cpp Sun Apr 16 06:11:21 2000 --- sidplay-base-1.0.4-agenda/sidplay.cpp Tue May 22 10:37:36 2001 *************** *** 88,93 **** --- 88,94 ---- } static bool verboseOutput = false; + static int volume = 255; int main(int argc, char *argv[]) { *************** *** 228,236 **** --- 229,243 ---- } break; #endif + case 'S': + myEmuConfig.channels = SIDEMU_NONE; + break; case 'v': verboseOutput = true; break; + case 'V': + volume = atoi(argv[a]+2); + break; default: printSyntax(argv[0]); exit(0); *************** *** 341,346 **** --- 348,354 ---- cout << "Block size : " << (udword)myAudio.GetBlockSize() << endl << "Fragments : " << myAudio.GetFragments() << endl; } + myAudio.SetVolume(volume); // ====================================================================== // CONFIGURE THE EMULATOR ENGINE *************** *** 492,497 **** --- 500,506 ---- << " -bn set number of audio buffer fragments to use" << endl << " -bs set size 2^ of audio buffer fragments" << endl << " -b set sample buffer size" << endl + << " -V volume (default == 255 == max)" << endl << endl << "Mail comments, bug reports, or contributions to ." << endl; }