| [354] | 1 | /* SCCSID = %W% %E% */
|
|---|
| 2 | /****************************************************************************
|
|---|
| 3 | * *
|
|---|
| 4 | * Copyright (c) IBM Corporation 1994 - 1997. *
|
|---|
| 5 | * *
|
|---|
| 6 | * The following IBM OS/2 source code is provided to you solely for the *
|
|---|
| 7 | * the purpose of assisting you in your development of OS/2 device drivers. *
|
|---|
| 8 | * You may use this code in accordance with the IBM License Agreement *
|
|---|
| 9 | * provided in the IBM Device Driver Source Kit for OS/2. *
|
|---|
| 10 | * *
|
|---|
| 11 | ****************************************************************************/
|
|---|
| 12 | /**@internal %W%
|
|---|
| 13 | * FMSYNTH object implementation.
|
|---|
| 14 | * @version %I%
|
|---|
| 15 | * @context
|
|---|
| 16 | * Unless otherwise noted, all interfaces are Ring-0, 16-bit, kernel stack.
|
|---|
| 17 | * @notes
|
|---|
| 18 | * @history
|
|---|
| 19 | */
|
|---|
| 20 |
|
|---|
| 21 | #include "fmsynth.hpp" // Object definition.
|
|---|
| 22 | #include "timer.hpp" // Object definition.
|
|---|
| 23 | #include "stream.hpp" // Prereq to includeing midistrm.h
|
|---|
| 24 | #include "midistrm.hpp" // Object definition.
|
|---|
| 25 |
|
|---|
| 26 | //extern "C" BOOL FMInit();
|
|---|
| 27 |
|
|---|
| 28 |
|
|---|
| 29 | /* FMSYNTH constructor
|
|---|
| 30 | ;
|
|---|
| 31 | ; portNum - I/O port number through which the FMSYNTH interface
|
|---|
| 32 | ; operates; normally 0x388.
|
|---|
| 33 | */
|
|---|
| 34 | /*
|
|---|
| 35 | FMSYNTH::FMSYNTH( USHORT portNum, TIMER* pTimer ) :
|
|---|
| 36 | MIDIAUDIO ( AUDIOHW_FMSYNTH_PLAY, pTimer ),
|
|---|
| 37 | _port ( portNum )
|
|---|
| 38 | {
|
|---|
| 39 | FMInit();
|
|---|
| 40 | }
|
|---|
| 41 | */
|
|---|
| 42 |
|
|---|
| 43 |
|
|---|
| 44 | /* writeByte - Write one byte to the MIDI hardware.
|
|---|
| 45 | ;
|
|---|
| 46 | */
|
|---|
| 47 | //int FMSYNTH::writeByte( BYTE /*b*/ ) { return 0; }
|
|---|
| 48 |
|
|---|
| 49 |
|
|---|
| 50 | /* readByte - Read one byte from MIDI hardware.
|
|---|
| 51 | ;
|
|---|
| 52 | ; FMSYNTH is a write only technology so this always returns error (-1).
|
|---|
| 53 | */
|
|---|
| 54 | //int FMSYNTH::readByte( void ) { return -1; }
|
|---|
| 55 |
|
|---|
| 56 |
|
|---|
| 57 | // Initialize the board at task time
|
|---|
| 58 | //int FMSYNTH::Initialize(void) { return FMInit(); }
|
|---|
| 59 |
|
|---|
| 60 |
|
|---|
| 61 |
|
|---|
| 62 | // Pause the operation
|
|---|
| 63 | int FMSYNTH::Pause(STREAM *)
|
|---|
| 64 | {
|
|---|
| 65 | getTimer()->Pause();
|
|---|
| 66 | shut_off_all();
|
|---|
| 67 | return 0;
|
|---|
| 68 | }
|
|---|
| 69 |
|
|---|
| 70 | // Resume the operation
|
|---|
| 71 | int FMSYNTH::Resume(STREAM *)
|
|---|
| 72 | {
|
|---|
| 73 | return getTimer()->Resume();
|
|---|
| 74 | }
|
|---|
| 75 |
|
|---|
| 76 | int FMSYNTH::Start(STREAM *)
|
|---|
| 77 | {
|
|---|
| 78 | return getTimer()->Start();
|
|---|
| 79 | }
|
|---|
| 80 |
|
|---|
| 81 | int FMSYNTH::Stop(STREAM *)
|
|---|
| 82 | {
|
|---|
| 83 | getTimer()->Stop();
|
|---|
| 84 | shut_off_all();
|
|---|
| 85 | return 0;
|
|---|
| 86 | }
|
|---|
| 87 |
|
|---|