*dlls/winmm/winearts, arts.c, arts.h, audio.c, mixer.c, mmaux.c, winearts.drv.spec, Makefile.in: Chris Morgan cmorgan@alum.wpi.edu Added aRts driver to wine
*configure, configure.ac, dlls/Makefile.in, include/config.h.in, dlls/dsound/dsound_main.c, documentation/samples/config: Chris Morgan cmorgan@alum.wpi.edu Changes for aRts driver, added commented out entry to WinMM section of sample config file, added configure time checks for artsc support. One question I had was what to do about EXTRADEFS entry in dlls/winmm/winearts/Makefile.in? Is this ok or does it have to be a configure detected thing?
Any comments about this patch are more than welcome.
Thanks, Chris
Chris Morgan a écrit :
*dlls/winmm/winearts, arts.c, arts.h, audio.c, mixer.c, mmaux.c, winearts.drv.spec, Makefile.in: Chris Morgan cmorgan@alum.wpi.edu Added aRts driver to wine
*configure, configure.ac, dlls/Makefile.in, include/config.h.in, dlls/dsound/dsound_main.c, documentation/samples/config: One question I had was what to do about EXTRADEFS entry in dlls/winmm/winearts/Makefile.in? Is this ok or does it have to be a configure detected thing?
- first of all, you need not to hardcode the artsc lib in the makefile.in otherwise, wine won't compile for people who don't have the lib installed. this should be checked in configure - for the extra defs, you can either check also in configure (and get defines like HAVE_KDE_ARTSC_ARTSC_H), or use #include <kde/artsc/artsc.h> in the C files)
different remarks after a cursory look: critical - why do you hard code rate and # of bits of the current stream in wodPlayer_DSPWait. You should use wwo->format.wf.nSamplesPerSec and wwo->format.wBitsPerSample (and perhaps wwo->format.wf.nChannels, I didn't check what arts returns as its buffer position) - I'm definitevely not sure you are allowed to write onto the sound buffer passed by the application. So, you should be implementing the mixer differently. Moreover, this API is mainly deprecated since Win95 (as the aux interface) and has been replaced by all the mixer stuff... so either you don't support mixing at all, or you support the C++ mixer interface (Alexandre may not like it) - the volume_effect32 function is only valid when: + stream is stereo + stream is 16 bit wide which is only covers 1/4 of the possible streams to be played - moreover, if the driver is playing a loop (WHDR_LOOPBEGIN), you'll apply your volume change for every loop which is played... bad - the configuration remarks above
medium - in wodClose, you should close your arts stream somewhere
cleanup - you don't need both ARTS_Close* and ARTS_Release. ARTS_Close should be just fine - in wodOpen, you can get rid of the format (and likely dsp_stereo) local variables - if you don't expect implementing the (mid|mod|aux|mix)Message functions, just remove them from the .spec and the .c files, winmm will know how to take care of that - I think you could get rid of the OSS includes in arts.h