home *** CD-ROM | disk | FTP | other *** search
/ Mac-Source 1994 July / Mac-Source_July_1994.iso / C and C++ / Libraries / MIDI Manager Class Library / CMIDIInputPort.h < prev    next >
Encoding:
C/C++ Source or Header  |  1993-01-05  |  1.2 KB  |  43 lines  |  [TEXT/KAHL]

  1. /*
  2.  *--- CMIDIInputPort.h --------------------------------------------------------
  3.  * Copyright © Paul Ferguson, 1990, 1991, 1992.  All rights reserved.
  4.  *
  5.  * For use with THINK C 5.0 and the THINK Class Library.
  6.  *
  7.  * Description:
  8.  *    This class defines a MIDI Manager Input port object.
  9.  *
  10.  *    Refer to the CMIDI Programmer's Manual for a complete desciption of
  11.  *    this class.
  12.  *----------------------------------------------------------------------------
  13.  */
  14. #pragma once
  15. #include "CMIDIDataPort.h"
  16. #include "CMIDITimePort.h"
  17.  
  18. class CMIDIInputPort : public CMIDIDataPort
  19. {
  20. public:
  21.  
  22.     OSErr     IMIDIInputPort(
  23.                 StringPtr        theName,         // Pascal format, 31 char max
  24.                 OSType            thePortID,
  25.                 Boolean            theVisibleFlag,
  26.                 CMIDITimePort *    theTimePort,
  27.                 long            theOffset,        // Current, nothing, everything
  28.                 short            theBufSize,
  29.                 ProcPtr            theReadHook);
  30.     ProcPtr    GetReadHook(void);
  31.     void    SetReadHook(ProcPtr theReadHook);
  32.     void    Flush(void);
  33.     void    Poll(long offsetTime);
  34.     void    DiscardPacket(MIDIPacketPtr thePacket);
  35.  
  36. private:
  37.  
  38.     static pascal void    (*midiDiscardProc) (short theRefNum, MIDIPacketPtr thePacket);
  39.     static pascal void    (*midiPollProc) (short theRefNum, long theOffsetTime);
  40.     static pascal void    (*midiFlushProc) (short theRefNum);
  41. };
  42.  
  43. // end of CMIDIInputPort.h