[AD] wdsndmix.c and DIFF, please commit this |
[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]
Attached are wdsndmix which is a new file for allegro (goes in allegro/src/win), and a diff with changes needed to other files (makefile.lst, include/allegro/alwin.h and src/win/wdsound.c) If anything else needs to be done (like checking it compiles with MSVC, and make depend) please do so. What it does: This duplicates the drivers created with wdsound.c, but uses allegro mixer for much better compatibility. Driver can be chosen with setup utility, new drivers prefixed with 'Allegmix'. Driver IDs are same as old except begin with 'A'. Regards, Robin Burrows.
? CHANGES ? myreadmgw.txt ? Makefile ? faq.txt ? help.txt ? AUTHORS ? THANKS ? allegro.txt ? all3933.dll ? NEWALL.ZIP ? _depend.arg ? _depend.tmp ? sndmix.diff ? demo/all3933.dll ? docs/allegro.rtf ? docs/const.txt ? examples/all3933.dll ? lib/mingw32/all3933.dll ? lib/mingw32/newds.zip ? obj/a3933dir.txt ? obj/mingw32/mmx.h ? obj/mingw32/mmxtest.s ? obj/mingw32/alleg/scrsave.res ? setup/all3933.dll ? setup/allegro.cfg ? src/win/wdsoundnew.c ? src/win/mywddraw.c ? src/win/wdsoundsec.c ? src/win/flippch1.diff ? src/win/wdsoundold.c ? src/win/wsnddrvold.c ? src/win/mywddbmp.c ? src/win/wdsoundlatency.c ? src/win/wdsndmix.c ? tests/all3933.dll ? wintests/scrsave.scr Index: makefile.lst =================================================================== RCS file: /cvsroot/alleg/allegro/makefile.lst,v retrieving revision 1.4 diff -u -r1.4 makefile.lst --- makefile.lst 2000/07/29 10:18:43 1.4 +++ makefile.lst 2000/09/22 00:02:22 @@ -165,6 +165,7 @@ src/win/wddwin.c \ src/win/update.s \ src/win/wdsound.c \ + src/win/wdsndmix.c \ src/win/wdxver.c \ src/win/wdispsw.c \ src/win/wfile.c \ Index: include/allegro/alwin.h =================================================================== RCS file: /cvsroot/alleg/allegro/include/allegro/alwin.h,v retrieving revision 1.1.1.1 diff -u -r1.1.1.1 alwin.h --- include/allegro/alwin.h 2000/05/14 20:16:48 1.1.1.1 +++ include/allegro/alwin.h 2000/09/22 00:02:26 @@ -154,6 +154,7 @@ /*************** sound drivers **************/ /********************************************/ #define DIGI_DIRECTX(n) AL_ID('D','X','A'+(n),' ') +#define DIGI_DIRECTAMX(n) AL_ID('A','X','A'+(n),' ') #define MIDI_WIN32(n) AL_ID('W','3','2','A'+(n)) Index: src/win/wdsound.c =================================================================== RCS file: /cvsroot/alleg/allegro/src/win/wdsound.c,v retrieving revision 1.3 diff -u -r1.3 wdsound.c --- src/win/wdsound.c 2000/08/26 07:27:49 1.3 +++ src/win/wdsound.c 2000/09/22 00:02:39 @@ -191,8 +191,9 @@ return (num_drivers < MAX_DRIVERS); } +/* Function from wdsndmix.c to get a driver */ +DIGI_DRIVER * _get_dsalmix_driver (char *, int); - /* _get_digi_driver_list: * System driver hook for listing the available sound drivers. This * generates the device list at runtime, to match whatever DirectSound @@ -206,8 +207,10 @@ if (!driver_list) { DirectSoundEnumerate(DSEnumCallback, NULL); - driver_list = malloc(sizeof(_DRIVER_INFO) * (num_drivers+2)); +/* This function has to allocate drivers for wdsndmix.c as well */ + driver_list = malloc(sizeof(_DRIVER_INFO) * ((num_drivers*2)+2)); +/* wdsound.c drivers */ for (i=0; i<num_drivers; i++) { driver = malloc(sizeof(DIGI_DRIVER)); memcpy(driver, &digi_directx, sizeof(DIGI_DRIVER)); @@ -220,17 +223,26 @@ driver_list[i].driver = driver; driver_list[i].autodetect = TRUE; } + +/* wdsndmix.c drivers */ + for (i=0; i<num_drivers; i++) { + driver = _get_dsalmix_driver (driver_names[i], i); + + driver_list[i+num_drivers].id = driver->id; + driver_list[i+num_drivers].driver = driver; + driver_list[i+num_drivers].autodetect = TRUE; + } - driver_list[i].id = DIGI_NONE; - driver_list[i].driver = &digi_none; - driver_list[i].autodetect = TRUE; - - driver_list[i+1].id = 0; - driver_list[i+1].driver = NULL; - driver_list[i+1].autodetect = FALSE; + driver_list[i+num_drivers].id = DIGI_NONE; + driver_list[i+num_drivers].driver = &digi_none; + driver_list[i+num_drivers].autodetect = TRUE; + + driver_list[i+num_drivers+1].id = 0; + driver_list[i+num_drivers+1].driver = NULL; + driver_list[i+num_drivers+1].autodetect = FALSE; } - return driver_list; + return driver_list; }
Attachment:
wdsndmix.c
Description: application/unknown-content-type-c_auto_file
Mail converted by MHonArc 2.6.19+ | http://listengine.tuxfamily.org/ |