1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129
|
/****************************************************************************
HalTimecode.h
Description: Lynx Application Programming Interface Header File
Created: David A. Hoatson, September 2000
Copyright 2000 Lynx Studio Technology, Inc.
This software contains the valuable TRADE SECRETS and CONFIDENTIAL INFORMATION
of Lynx Studio Technology, Inc. The software is protected under copyright
laws as an unpublished work of Lynx Studio Technology, Inc. Notice is
for informational purposes only and does not imply publication. The user
of this software may make copies of the software for use with products
manufactured by Lynx Studio Technology, Inc. or under license from
Lynx Studio Technology, Inc. and for no other use.
THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY
KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR
PURPOSE.
Environment:
4 spaces per tab
Revision History
When Who Description
--------- --- ------------------------------------------------------------
****************************************************************************/
#ifndef _HALTIMECODE_H
#define _HALTIMECODE_H
#include "HalRegister.h" // Added by ClassView
#include "Hal.h"
#include "HalEnv.h" // Added by ClassView
#include "HalDevice.h"
#include "LynxTWO.h"
enum
{
TC_BUFFERA = 0,
TC_BUFFERB
};
enum
{
TC_RX = 0,
TC_TX
};
class CHalTimecode:public CHalDevice
{
public:
CHalTimecode ()
{
}
~CHalTimecode ()
{
}
USHORT Open (PHALADAPTER pHalAdapter, ULONG ulDeviceNumber);
USHORT Close ();
USHORT Start ();
USHORT Stop ();
USHORT Service (ULONG ulBufferID);
USHORT SetDefaults (void);
USHORT SetMixerControl (USHORT usControl, ULONG ulValue);
USHORT GetMixerControl (USHORT usControl, PULONG pulValue);
USHORT EnableMTC (BOOLEAN bEnable);
USHORT GetMTCFrameRate (PBYTE pucMTCFrameRate);
BOOLEAN IsRx ()
{
return (m_ulDeviceNumber == TC_RX);
};
USHORT SetFrameRate (ULONG ulFrameRate);
USHORT GetFrameRate (PULONG pulFrameRate);
USHORT SetPosition (ULONG ulPosition);
USHORT GetPosition (PULONG pulPosition);
USHORT SetDropFrame (BOOLEAN bDropFrame);
BOOLEAN GetDropFrame ()
{
return (m_bDropFrame);
};
USHORT SetSyncSource (ULONG ulSyncSource);
ULONG GetSyncSource ()
{
return (m_ulSyncSource);
};
ULONG GetInputDirection (void);
BOOLEAN IsInputLocked (void);
BOOLEAN HasValidTimecode (void);
USHORT ResetValidTimecode (void);
private:
void IncrementTimecode ();
void WriteTimecode (ULONG ulBufferID, PULONG pulTxBuffer);
void EncodeTxBuffer (PULONG pulTxBuffer);
BOOLEAN m_bOpen;
LYNXTIMECODE m_CurrentPosition;
ULONG m_ulFrameRate;
BYTE m_ucMTCFrameRate;
BYTE m_ucMaxFrame;
BOOLEAN m_bHasValidTimecode;
CHalRegister m_RegTCStatus;
CHalRegister m_RegLTCRxRate;
PHALREGISTER m_pRegLTCControl;
BOOLEAN m_bDropFrame; // Global flag if drop frame is enabled
ULONG m_ulSyncSource;
BOOLEAN m_bMTCRunning; // TRUE if MTC has ever been detected running on MIDI Out
};
#endif // _HALTIMECODE_H
|