Attached find files for libaudioio patch for audio on solaris 7 winmm.diff - Only the makefile patch is significant wavemap, just contains some extra debugging traces libaudioio.tar, libaudioio goes under winmm base.diff, Patches to configure.in and Makefile.in to better support Solaris and Libaudioio config.h.in added HAVE_SOLARIS and HAVE_LIBAUDIOIO and added a way for force a 32 bit mmap. Hopefully this is it...
? libaudioio Index: Makefile.in =================================================================== RCS file: /home/wine/wine/dlls/winmm/Makefile.in,v retrieving revision 1.19 diff -u -3 -p -u -r1.19 Makefile.in --- Makefile.in 2001/01/13 01:01:00 1.19 +++ Makefile.in 2001/11/19 11:30:19 @@ -4,7 +4,7 @@ SRCDIR = @srcdir@ VPATH = @srcdir@ MODULE = winmm ALTNAMES = mmsystem sound - +EXTRALIBS = @LIBAUDIOIO@ LDDLLFLAGS = @LDDLLFLAGS@ SYMBOLFILE = $(MODULE).tmp.o Index: wavemap/wavemap.c =================================================================== RCS file: /home/wine/wine/dlls/winmm/wavemap/wavemap.c,v retrieving revision 1.15 diff -u -3 -p -u -r1.15 wavemap.c --- wavemap/wavemap.c 2001/07/11 18:56:44 1.15 +++ wavemap/wavemap.c 2001/11/19 11:30:20 @@ -80,27 +80,31 @@ static void CALLBACK wodCallback(HWAVE h ERR("Unknown msg %u\n", uMsg); } - DriverCallback(wom->dwCallback, HIWORD(wom->dwFlags), wom->hOuterWave, uMsg, + DriverCallback(wom->dwCallback, HIWORD(wom->dwFlags), wom->hOuterWave, uMsg, wom->dwClientInstance, dwParam1, dwParam2); } -static DWORD wodOpenHelper(WAVEMAPDATA* wom, UINT idx, - LPWAVEOPENDESC lpDesc, LPWAVEFORMATEX lpwfx, +static DWORD wodOpenHelper(WAVEMAPDATA* wom, UINT idx, + LPWAVEOPENDESC lpDesc, LPWAVEFORMATEX lpwfx, DWORD dwFlags) { DWORD ret; + TRACE("wodOpenHelper\n"); /* destination is always PCM, so the formulas below apply */ lpwfx->nBlockAlign = (lpwfx->nChannels * lpwfx->wBitsPerSample) / 8; lpwfx->nAvgBytesPerSec = lpwfx->nSamplesPerSec * lpwfx->nBlockAlign; if (dwFlags & WAVE_FORMAT_QUERY) { ret = acmStreamOpen(NULL, 0, lpDesc->lpFormat, lpwfx, NULL, 0L, 0L, ACM_STREAMOPENF_QUERY); + TRACE("Querying acmStreamOpen returns %ld\n",ret); } else { ret = acmStreamOpen(&wom->hAcmStream, 0, lpDesc->lpFormat, lpwfx, NULL, 0L, 0L, 0L); + TRACE("acmStreamOpen returns %ld",ret); } if (ret == MMSYSERR_NOERROR) { - ret = waveOutOpen(&wom->hInnerWave, idx, lpwfx, (DWORD)wodCallback, + ret = waveOutOpen(&wom->hInnerWave, idx, lpwfx, (DWORD)wodCallback, (DWORD)wom, (dwFlags & ~CALLBACK_TYPEMASK) | CALLBACK_FUNCTION); + TRACE("waveoutOpen returns %ld",ret); if (ret != MMSYSERR_NOERROR && !(dwFlags & WAVE_FORMAT_QUERY)) { acmStreamClose(wom->hAcmStream, 0); wom->hAcmStream = 0; @@ -131,7 +135,7 @@ static DWORD wodOpen(LPDWORD lpdwUser, L /* if no ACM stuff is involved, no need to handle callbacks at this * level, this will be done transparently */ - if (waveOutOpen(&wom->hInnerWave, i, lpDesc->lpFormat, (DWORD)wodCallback, + if (waveOutOpen(&wom->hInnerWave, i, lpDesc->lpFormat, (DWORD)wodCallback, (DWORD)wom, (dwFlags & ~CALLBACK_TYPEMASK) | CALLBACK_FUNCTION) == MMSYSERR_NOERROR) { wom->hAcmStream = 0; goto found; @@ -143,6 +147,7 @@ static DWORD wodOpen(LPDWORD lpdwUser, L /* try some ACM stuff */ #define TRY(sps,bps) wfx.nSamplesPerSec = (sps); wfx.wBitsPerSample = (bps); \ + TRACE("Chan %ld rate %ld Precision %ld",wfx.nChannels,sps,bps); if (wodOpenHelper(wom, i, lpDesc, &wfx, dwFlags) == MMSYSERR_NOERROR) goto found; for (i = 0; i < nd; i++) { @@ -153,7 +158,7 @@ static DWORD wodOpen(LPDWORD lpdwUser, L TRY(11025, 16); /* 2^3 => 1, 1^3 => 2, so if stereo, try mono (and the other way around) */ - wfx.nChannels ^= 3; + wfx.nChannels ^= 3; TRY(44100, 16); TRY(22050, 16); TRY(11025, 16);
Attachment:
libaudioio.tar
Description: Unix tar archive
Index: configure.in =================================================================== RCS file: /home/wine/wine/configure.in,v retrieving revision 1.236 diff -u -3 -p -u -r1.236 configure.in --- configure.in 2001/11/06 22:26:53 1.236 +++ configure.in 2001/11/19 11:43:30 @@ -15,11 +15,16 @@ TRACE_MSGS=yes # the TRACE() macro DEBUG_MSGS=yes # the TRACE(), WARN(), and FIXME() macros. CURSES=yes OPENGL=normal +FILE64=yes AC_ARG_ENABLE(debug, [ --disable-debug compile out all debugging messages], [if test "$enableval" = "no"; then DEBUG_MSGS="no"; fi]) +AC_ARG_ENABLE(longfiles, +[ --disable-longfiles Disable 64 bit file support], +[if test "$enableval" = "no"; then FILE64="no"; fi]) + AC_ARG_ENABLE(opengl, [ --enable-opengl force usage of OpenGL even if the latter is thread-safe via pthread], [if test "$enableval" = "no"; then OPENGL="no"; elif test "$enableval" = "yes"; then OPENGL="yes"; fi]) @@ -87,6 +92,10 @@ else LDCOMBINE="ld -r" fi AC_SUBST(LDCOMBINE) +if test -d /boot/solaris +then +AC_DEFINE(HAVE_SOLARIS) +fi dnl **** Check for some libraries **** @@ -132,6 +141,24 @@ AC_CHECK_HEADERS(jpeglib.h, ) ) +dnl Check for libaudioio (which can be used to get solaris audio support) + +libaudioio_found=no +AC_CHECK_HEADER(libaudioio.h, + [ + AC_CHECK_LIB(audioio,AudioIOGetVersion, + [ + LIBAUDIOIO="-laudioio" + AC_DEFINE(HAVE_LIBAUDIOIO, 1, + [ + Define if you have libaudioIO (required if you want to have libaudioio support) + ] + ) + libaudioio_found=yes + ]) + ]) + +AC_SUBST(LIBAUDIOIO) AC_SUBST(XLIB) AC_SUBST(XFILES) @@ -381,6 +408,7 @@ AC_CHECK_LIB(cups,cupsGetPPD, ) AC_SUBST(CUPSLIBS) + dnl **** Check for FreeType 2 **** AC_CHECK_LIB(freetype,FT_Init_FreeType,ft_lib=yes,ft_lib=no,$X_LIBS) if test "$ft_lib" = "no" @@ -521,7 +549,8 @@ dnl **** If ln -s doesn't work, use cp i if test "$ac_cv_prog_LN_S" = "ln -s"; then : ; else LN_S=cp ; fi dnl **** Check for broken glibc mmap64 **** - +if test "$FILE64" = "yes" +then AC_CACHE_CHECK( [whether mmap64 works defined as mmap], ac_cv_mmap64_works, AC_TRY_RUN([ #define _FILE_OFFSET_BITS 64 @@ -553,6 +582,10 @@ AC_CACHE_CHECK( [whether mmap64 works de ac_cv_mmap64_works="yes", ac_cv_mmap64_works="no", ac_cv_mmap64_works="no") ) +elif test "$FILE64" = "no" +then + ac_cv_mmap64_works="no" +fi if test "$ac_cv_mmap64_works" = "yes" then @@ -574,7 +607,7 @@ int main(void) { for(i=0; i<B; i++) Array[[i]] = i - 3; for(i=0; i<4 - 1; i++) L[[i]] = L[[i + 1]]; L[[i]] = 4; - + exit( Array[[1]] != -2 || L[[2]] != 3); }], ac_cv_c_gcc_strength_bug="no", @@ -617,7 +650,7 @@ if test "$ac_cv_c_type_in_def" = "yes" then AC_DEFINE(NEED_TYPE_IN_DEF, 1, [Define if .type asm directive must be inside a .def directive]) fi - + dnl **** Check for underscore on external symbols **** AC_CACHE_CHECK([whether external symbols need an underscore prefix], @@ -1294,6 +1327,7 @@ dlls/winmm/mciwave/Makefile dlls/winmm/midimap/Makefile dlls/winmm/wavemap/Makefile dlls/winmm/wineoss/Makefile +dlls/winmm/libaudioio/Makefile dlls/winnls/Makefile dlls/winsock/Makefile dlls/winspool/Makefile
Index: include/config.h.in =================================================================== RCS file: /home/wine/wine/include/config.h.in,v retrieving revision 1.91 diff -u -3 -p -u -r1.91 config.h.in --- include/config.h.in 2001/11/06 20:57:19 1.91 +++ include/config.h.in 2001/11/19 11:01:24 @@ -1,5 +1,5 @@ /* include/config.h.in. Generated automatically from configure.in by autoheader 2.13. */ - +#undef HAVE_SOLARIS /* Define if using alloca.c. */ #undef C_ALLOCA @@ -252,6 +252,9 @@ /* Define if you have the <jpeglib.h> header file. */ #undef HAVE_JPEGLIB_H + +/* Define if you have Libaudioio on Solaris */ +#undef HAVE_LIBAUDIOIO /* Define if you have the <libio.h> header file. */ #undef HAVE_LIBIO_H