| 1 | /* $Id: maudio.cpp,v 1.1 2000/04/23 14:55:17 ktk Exp $ */
|
|---|
| 2 |
|
|---|
| 3 | /* SCCSID = %W% %E% */
|
|---|
| 4 | /****************************************************************************
|
|---|
| 5 | * *
|
|---|
| 6 | * Copyright (c) IBM Corporation 1994 - 1997. *
|
|---|
| 7 | * *
|
|---|
| 8 | * The following IBM OS/2 source code is provided to you solely for the *
|
|---|
| 9 | * the purpose of assisting you in your development of OS/2 device drivers. *
|
|---|
| 10 | * You may use this code in accordance with the IBM License Agreement *
|
|---|
| 11 | * provided in the IBM Device Driver Source Kit for OS/2. *
|
|---|
| 12 | * *
|
|---|
| 13 | ****************************************************************************/
|
|---|
| 14 | /**@internal %W%
|
|---|
| 15 | * MIDI audio hardware object implementation.
|
|---|
| 16 | * @version %I%
|
|---|
| 17 | * @context
|
|---|
| 18 | * Unless otherwise noted, all interfaces are Ring-0, 16-bit, kernel stack.
|
|---|
| 19 | * @notes
|
|---|
| 20 | * @history
|
|---|
| 21 | */
|
|---|
| 22 |
|
|---|
| 23 | #define INCL_NOPMAPI
|
|---|
| 24 | #include <os2.h>
|
|---|
| 25 | #include <os2medef.h>
|
|---|
| 26 | #include <audio.h>
|
|---|
| 27 | #include <sbvsd.h>
|
|---|
| 28 |
|
|---|
| 29 | //#include "..\midi\midi_idc.h" // RTMIDI interfaces,
|
|---|
| 30 | #include "midi_idc.h"
|
|---|
| 31 | #include "maudio.hpp"
|
|---|
| 32 |
|
|---|
| 33 |
|
|---|
| 34 |
|
|---|
| 35 | void MIDIAUDIO::DevCaps(PAUDIO_CAPS pCaps)
|
|---|
| 36 | {
|
|---|
| 37 | pCaps->ulSupport = SUPPORT_SUCCESS;
|
|---|
| 38 | pCaps->ulDataSubType = SUBTYPE_NONE;
|
|---|
| 39 | pCaps->ulResourceUnits = 1;
|
|---|
| 40 | pCaps->ulResourceClass = MIDI_PLAYBACK_CLASS;
|
|---|
| 41 | pCaps->fCanRecord = FALSE;
|
|---|
| 42 | pCaps->ulFlags = INPUT | // Input select is supported
|
|---|
| 43 | OUTPUT | // Output select is supported
|
|---|
| 44 | MONITOR | // Monitor is supported
|
|---|
| 45 | VOLUME; // Volume control is supported
|
|---|
| 46 | }
|
|---|
| 47 |
|
|---|
| 48 |
|
|---|
| 49 | // Default routines for RTMIDI - always return failure codes
|
|---|
| 50 | // if these haven't been redefined by the sub-classes.
|
|---|
| 51 |
|
|---|
| 52 | int MIDIAUDIO::writeByte(BYTE /*b*/)
|
|---|
| 53 | {
|
|---|
| 54 | return 0; // Failure.
|
|---|
| 55 | }
|
|---|
| 56 |
|
|---|
| 57 | int MIDIAUDIO::readByte(void)
|
|---|
| 58 | {
|
|---|
| 59 | return -1; // Failure.
|
|---|
| 60 | }
|
|---|
| 61 |
|
|---|
| 62 | USHORT MIDIAUDIO::RTMIDI_OpenReceive(void)
|
|---|
| 63 | {
|
|---|
| 64 | return MIDIERRA_NO_HARDWARE;
|
|---|
| 65 | }
|
|---|
| 66 |
|
|---|
| 67 | USHORT MIDIAUDIO::RTMIDI_OpenSend(void)
|
|---|
| 68 | {
|
|---|
| 69 | return MIDIERRA_NO_HARDWARE;
|
|---|
| 70 | }
|
|---|
| 71 |
|
|---|
| 72 | USHORT MIDIAUDIO::RTMIDI_CloseReceive(void)
|
|---|
| 73 | {
|
|---|
| 74 | return MIDIERRA_NO_HARDWARE;
|
|---|
| 75 | }
|
|---|
| 76 |
|
|---|
| 77 | USHORT MIDIAUDIO::RTMIDI_CloseSend(void)
|
|---|
| 78 | {
|
|---|
| 79 | return MIDIERRA_NO_HARDWARE;
|
|---|
| 80 | }
|
|---|
| 81 |
|
|---|
| 82 |
|
|---|