Sweden-Number/misc/mmaux.c

118 lines
3.0 KiB
C
Raw Normal View History

Release 940706 Sun, 3 Jul 1994 20:15:56 +0100 (BST) David Metcalfe <david@prism.demon.co.uk> * [controls/edit.c] Bug fixes and tidying up. Preliminary tab stop support (doesn't work yet). * [windows/dialog.c] Reversed order of buttons in CheckRadioButtons so that all buttons are now displayed. Tue Jul 5 18:30:24 1994 Alexandre Julliard (julliard@lamisun.epfl.ch) * [include/options.h] [misc/main.c] [windows/win.c] Removed nosaveunders option, replaced by handling the CS_SAVEBITS flag. * [windows/class.c] Modified the fix for negative size in class extra bytes to avoid modifying the caller's data. * [windows/dc.c] Bug fix: system font must be a proportional font. Fixed a bug that caused the default pen to not be selected correctly in a DC. * [windows/graphics.c] Bug fix in GRAPH_DrawArc(). Thanks to Adriano Azevedo for noticing it. * [windows/painting.c] Removed incorrect selecting of default objects in BeginPaint() (no longer needed because of the fix in dc.c). Jul 4, 94 martin2@trgcorp.solucorp.qc.ca (Martin Ayotte) * [misc/mmsystem.c] * [misc/audio.c] Add more code to interface '/dev/dsp'. * New file [misc/mcicda.c] Create an MCI_DEVTYPE_CD_AUDIO driver connected to '/dev/sbpcd'. * New file [misc/mmaux.c] Stubs to make a future driver connected to '/dev/mixer'. * [windows/win.c] Temporary patch to CreateWindowEx() for reseting negative coordinates to 0,0 ; because 'soundrec.exe' give negative values and I need it to work on MMSYSTEM ... :-) * [miscemu/int2f.c] add a stub 'do_int2f_16' (function 0x16) for DMPI server. Mon Jun 20 10:08:40 BST 1994 William Smith (wos@dcs.warwick.ac.uk) * include/comm.h New file -- some definitions that were in comm.c now need to be shared with misc/dos_fs.c * misc/comm.c Some definitions moved into include/comm.h * misc/dos_fs.c (DOS_GetEquipment): Fixed error in equipment -- bitwise or of two values should be used instead of logical or. Also added code to correctly report the number of serial and parallel devices.
1994-07-07 18:23:58 +02:00
/*
* Sample AUXILARY Wine Driver for Linux
*
* Copyright 1994 Martin Ayotte
*/
Release 940714 Thu Jul 14 17:50:45 1994 Bob Amstadt (bob@pooh) * [Configure] Autodetects Linux version (if running Linux). * [loader/signal.c] New signals for Linux. * [loader/ldtlib.c] New structure field in sys call. Sun Jul 10 19:31:34 1994 Olaf Flebbe (olaf@dragon) * [load/resource.c] fixed Memory (Resource) Leak. * [load/main.c] fixed a printf. Tue Jul 12 18:50:34 1994 Alexandre Julliard (julliard@lamisun.epfl.ch) * [controls/desktop.c] Implemented desktop wallpaper (only 16 colors for now). * [controls/menu.c] [windows/nonclient.c] Preliminary work to allow multi-line menus. * [misc/main.c] No backing store on desktop window (not useful). * [objects/text.c] A few fixes to DrawText() to make underlines under mnemonic letters to look better. * [windows/graphics.c] More fixes to GRAPH_DrawArc(), and some fixes to Polygon(). Implemented PolyPolygon() (partially working). * [windows/winpos.c] New function WINPOS_SendNCCalcSize(). Cleaned up SetWindowPos() and added preliminary support for multi-line menus. Mon Jul 11 19:15:51 1994 Miguel de Icaza (miguel@sphinx) * [controls/edit.c] Changes to work as a library. * [if1632/callback.c] Ifdefed module. * [if1632/relay.c] Changes to allow linking with WineLib. * [include/windows.h] Added macro WINELIB_UNIMP * [loader/library.c] When compiling WineLib, GetProcAddress is not implemented yet. * [loader/main.c] Added empty InitDLL when using WineLib. * [loader/ne_image.c] Some parts of the loader are needed for WineLib, ifdefed correctly * [misc/{audio.c,mcicda.c,mmaux.c,mmsystem.c] Disable compilation of module when compiling WineLib. * [toolkit/heap.c] Fixed small bug. When passed an invalid handle WineLib would crash, now return NULL. * [toolkit/winmain.c] Call CreateNewTask in _WinMain. Sun Jul 10 09:08:02 1994 David Metcalfe <david@prism.demon.co.uk> * [controls/edit.c] [controls/widget.c] More changes to improve compatibility with Windows' edit control. Finished off tab stop support. Mon Jul 11 21:05:02 MET DST 1994 Erik Bos <erik@hacktic.nl> * [if1632/relay.c] # of ordinals in shell.dll changed to 103. * [loader/signal.c] sti, cli will now be ignored. * [objects/brush.c] Added stub for GetSysColorBrush().
1994-07-15 18:04:31 +02:00
#ifndef WINELIB
Release 940706 Sun, 3 Jul 1994 20:15:56 +0100 (BST) David Metcalfe <david@prism.demon.co.uk> * [controls/edit.c] Bug fixes and tidying up. Preliminary tab stop support (doesn't work yet). * [windows/dialog.c] Reversed order of buttons in CheckRadioButtons so that all buttons are now displayed. Tue Jul 5 18:30:24 1994 Alexandre Julliard (julliard@lamisun.epfl.ch) * [include/options.h] [misc/main.c] [windows/win.c] Removed nosaveunders option, replaced by handling the CS_SAVEBITS flag. * [windows/class.c] Modified the fix for negative size in class extra bytes to avoid modifying the caller's data. * [windows/dc.c] Bug fix: system font must be a proportional font. Fixed a bug that caused the default pen to not be selected correctly in a DC. * [windows/graphics.c] Bug fix in GRAPH_DrawArc(). Thanks to Adriano Azevedo for noticing it. * [windows/painting.c] Removed incorrect selecting of default objects in BeginPaint() (no longer needed because of the fix in dc.c). Jul 4, 94 martin2@trgcorp.solucorp.qc.ca (Martin Ayotte) * [misc/mmsystem.c] * [misc/audio.c] Add more code to interface '/dev/dsp'. * New file [misc/mcicda.c] Create an MCI_DEVTYPE_CD_AUDIO driver connected to '/dev/sbpcd'. * New file [misc/mmaux.c] Stubs to make a future driver connected to '/dev/mixer'. * [windows/win.c] Temporary patch to CreateWindowEx() for reseting negative coordinates to 0,0 ; because 'soundrec.exe' give negative values and I need it to work on MMSYSTEM ... :-) * [miscemu/int2f.c] add a stub 'do_int2f_16' (function 0x16) for DMPI server. Mon Jun 20 10:08:40 BST 1994 William Smith (wos@dcs.warwick.ac.uk) * include/comm.h New file -- some definitions that were in comm.c now need to be shared with misc/dos_fs.c * misc/comm.c Some definitions moved into include/comm.h * misc/dos_fs.c (DOS_GetEquipment): Fixed error in equipment -- bitwise or of two values should be used instead of logical or. Also added code to correctly report the number of serial and parallel devices.
1994-07-07 18:23:58 +02:00
static char Copyright[] = "Copyright Martin Ayotte, 1994";
#include "stdio.h"
#include "win.h"
#include "user.h"
#include "driver.h"
#include "mmsystem.h"
#include <fcntl.h>
#include <sys/ioctl.h>
#include <linux/soundcard.h>
#define SOUND_DEV "/dev/dsp"
#define MIXER_DEV "/dev/mixer"
#ifdef SOUND_VERSION
#define IOCTL(a,b,c) ioctl(a,b,&c)
#else
#define IOCTL(a,b,c) (c = ioctl(a,b,c) )
#endif
/*-----------------------------------------------------------------------*/
/**************************************************************************
* AUX_GetDevCaps [internal]
*/
DWORD AUX_GetDevCaps(WORD wDevID, LPAUXCAPS lpCaps, DWORD dwSize)
{
int mixer;
int volume;
printf("AUX_GetDevCaps(%u, %08X, %u);\n", wDevID, lpCaps, dwSize);
if (lpCaps == NULL) return MMSYSERR_NOTENABLED;
if ((mixer = open(MIXER_DEV, O_RDWR)) < 0) {
printf("AUX_GetDevCaps // mixer device not available !\n");
return MMSYSERR_NOTENABLED;
}
if (ioctl(mixer, SOUND_MIXER_READ_LINE, &volume) == -1) {
printf("AUX_GetDevCaps // unable read mixer !\n");
return MMSYSERR_NOTENABLED;
}
close(mixer);
return MMSYSERR_NOERROR;
}
/**************************************************************************
* AUX_GetVolume [internal]
*/
DWORD AUX_GetVolume(WORD wDevID, DWORD dwParam)
{
int mixer;
int volume;
printf("AUX_GetVolume(%u, %08X);\n", wDevID, dwParam);
if ((mixer = open(MIXER_DEV, O_RDWR)) < 0) {
printf("Linux 'AUX_GetVolume' // mixer device not available !\n");
return MMSYSERR_NOTENABLED;
}
if (ioctl(mixer, SOUND_MIXER_READ_LINE, &volume) == -1) {
printf("Linux 'AUX_GetVolume' // unable read mixer !\n");
return MMSYSERR_NOTENABLED;
}
close(mixer);
return MMSYSERR_NOERROR;
}
/**************************************************************************
* AUX_SetVolume [internal]
*/
DWORD AUX_SetVolume(WORD wDevID, DWORD dwParam)
{
int mixer;
int volume = 50;
printf("AUX_SetVolume(%u, %08X);\n", wDevID, dwParam);
if ((mixer = open(MIXER_DEV, O_RDWR)) < 0) {
printf("Linux 'AUX_SetVolume' // mixer device not available !\n");
return MMSYSERR_NOTENABLED;
}
if (ioctl(mixer, SOUND_MIXER_WRITE_LINE, &volume) == -1) {
printf("Linux 'AUX_SetVolume' // unable set mixer !\n");
return MMSYSERR_NOTENABLED;
}
close(mixer);
return MMSYSERR_NOERROR;
}
/**************************************************************************
* auxMessage [sample driver]
*/
DWORD auxMessage(WORD wDevID, WORD wMsg, DWORD dwUser,
DWORD dwParam1, DWORD dwParam2)
{
printf("auxMessage(%u, %04X, %08X, %08X, %08X);\n",
wDevID, wMsg, dwUser, dwParam1, dwParam2);
switch(wMsg) {
case AUXDM_GETDEVCAPS:
return AUX_GetDevCaps(wDevID, (LPAUXCAPS)dwParam1, dwParam2);
case AUXDM_GETNUMDEVS:
return 0L;
case AUXDM_GETVOLUME:
return AUX_GetVolume(wDevID, dwParam1);
case AUXDM_SETVOLUME:
return AUX_SetVolume(wDevID, dwParam1);
}
return MMSYSERR_NOTSUPPORTED;
}
Release 940714 Thu Jul 14 17:50:45 1994 Bob Amstadt (bob@pooh) * [Configure] Autodetects Linux version (if running Linux). * [loader/signal.c] New signals for Linux. * [loader/ldtlib.c] New structure field in sys call. Sun Jul 10 19:31:34 1994 Olaf Flebbe (olaf@dragon) * [load/resource.c] fixed Memory (Resource) Leak. * [load/main.c] fixed a printf. Tue Jul 12 18:50:34 1994 Alexandre Julliard (julliard@lamisun.epfl.ch) * [controls/desktop.c] Implemented desktop wallpaper (only 16 colors for now). * [controls/menu.c] [windows/nonclient.c] Preliminary work to allow multi-line menus. * [misc/main.c] No backing store on desktop window (not useful). * [objects/text.c] A few fixes to DrawText() to make underlines under mnemonic letters to look better. * [windows/graphics.c] More fixes to GRAPH_DrawArc(), and some fixes to Polygon(). Implemented PolyPolygon() (partially working). * [windows/winpos.c] New function WINPOS_SendNCCalcSize(). Cleaned up SetWindowPos() and added preliminary support for multi-line menus. Mon Jul 11 19:15:51 1994 Miguel de Icaza (miguel@sphinx) * [controls/edit.c] Changes to work as a library. * [if1632/callback.c] Ifdefed module. * [if1632/relay.c] Changes to allow linking with WineLib. * [include/windows.h] Added macro WINELIB_UNIMP * [loader/library.c] When compiling WineLib, GetProcAddress is not implemented yet. * [loader/main.c] Added empty InitDLL when using WineLib. * [loader/ne_image.c] Some parts of the loader are needed for WineLib, ifdefed correctly * [misc/{audio.c,mcicda.c,mmaux.c,mmsystem.c] Disable compilation of module when compiling WineLib. * [toolkit/heap.c] Fixed small bug. When passed an invalid handle WineLib would crash, now return NULL. * [toolkit/winmain.c] Call CreateNewTask in _WinMain. Sun Jul 10 09:08:02 1994 David Metcalfe <david@prism.demon.co.uk> * [controls/edit.c] [controls/widget.c] More changes to improve compatibility with Windows' edit control. Finished off tab stop support. Mon Jul 11 21:05:02 MET DST 1994 Erik Bos <erik@hacktic.nl> * [if1632/relay.c] # of ordinals in shell.dll changed to 103. * [loader/signal.c] sti, cli will now be ignored. * [objects/brush.c] Added stub for GetSysColorBrush().
1994-07-15 18:04:31 +02:00
#endif /* !WINELIB */