audioio.c 2.48 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
/* -*- tab-width: 8; c-basic-offset: 4 -*- */
/*
 * Wine Driver for Libaudioio
 * Derived From WineOSS
 * Copyright 	1999 Eric Pouech
 * Modifications by Robert Lunnon 2002
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
 * version 2.1 of the License, or (at your option) any later version.
 *
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public
 * License along with this library; if not, write to the Free Software
20
 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
21 22 23 24
 */

#include "config.h"

25 26
#include <stdarg.h>

27 28 29 30 31 32 33 34 35 36 37 38 39
#include "windef.h"
#include "winbase.h"
#include "wingdi.h"
#include "winuser.h"
#include "mmddk.h"

#ifdef HAVE_LIBAUDIOIO

extern LONG LIBAUDIOIO_WaveInit(void);

/**************************************************************************
 * 				LIBAUDIOIO_drvOpen			[internal]
 */
40
static LRESULT LIBAUDIOIO_drvOpen(LPSTR str)
41 42 43 44 45 46 47
{
    return 1;
}

/**************************************************************************
 * 				LIBAUDIOIO_drvClose			[internal]
 */
48
static LRESULT LIBAUDIOIO_drvClose(DWORD_PTR dwDevID)
49
{
50
    return 1;
51 52 53 54 55 56 57 58
}

#endif


/**************************************************************************
 * 				DriverProc
 */
59 60
LRESULT CALLBACK LIBAUDIOIO_DriverProc(DWORD_PTR dwDevID, HDRVR hDriv, UINT wMsg,
                                       LPARAM dwParam1, LPARAM dwParam2)
61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82
{
/* EPP     TRACE("(%08lX, %04X, %08lX, %08lX, %08lX)\n",  */
/* EPP 	  dwDevID, hDriv, wMsg, dwParam1, dwParam2); */

    switch(wMsg) {
#ifdef HAVE_LIBAUDIOIO
    case DRV_LOAD:		LIBAUDIOIO_WaveInit();
				return 1;
    case DRV_FREE:		return 1;
    case DRV_OPEN:		return LIBAUDIOIO_drvOpen((LPSTR)dwParam1);
    case DRV_CLOSE:		return LIBAUDIOIO_drvClose(dwDevID);
    case DRV_ENABLE:		return 1;
    case DRV_DISABLE:		return 1;
    case DRV_QUERYCONFIGURE:	return 1;
    case DRV_CONFIGURE:		MessageBoxA(0, "Libaudioio MultiMedia Driver !", "Libaudioio Driver", MB_OK);	return 1;
    case DRV_INSTALL:		return DRVCNF_RESTART;
    case DRV_REMOVE:		return DRVCNF_RESTART;
#endif
    default:
	return DefDriverProc(dwDevID, hDriv, wMsg, dwParam1, dwParam2);
    }
}