Exemple #1
0
bool	CAHALAudioDevice::HasPreferredChannelLayout(bool inIsInput) const
{
	CAPropertyAddress theAddress(kAudioDevicePropertyPreferredChannelLayout, inIsInput ? kAudioDevicePropertyScopeInput : kAudioDevicePropertyScopeOutput);
	return HasProperty(theAddress);
}
	bool Device::HasModelUID() const
	{
		return HasProperty(PropertyAddress(kCMIODevicePropertyModelUID));
	}
Exemple #3
0
bool CInformationPanel::CItem::IsButtonEnabled(int Button) const
{
	return Button==0 && HasProperty()
		&& GetAppClass().UICore.GetCommandEnabledState(m_PropertyID);
}
	bool Device::HasDevicePlugInStatus() const
	{
		return HasProperty(PropertyAddress(kCMIODevicePropertyPlugIn));
	}
	bool Device::HasVideoDigitizerComponents() const
	{
		return HasProperty(PropertyAddress(kCMIODevicePropertyVideoDigitizerComponents));
	}
Exemple #6
0
bool CEvent::HasAttribute( enum E_EventAttribute inAttr ) const
{
	uint8		cmd = Command();

	switch (inAttr) {
	case EvAttr_StartTime:					// start time
	case EvAttr_Type:						// event type
	case EvAttr_Selected:						// Whether it's selected or not
		return true;

	case EvAttr_Duration:						// event duration
	case EvAttr_StopTime:						// event stop time
		return HasProperty( Prop_Duration );
	
	case EvAttr_Channel:						// virtual channel number
		return HasProperty( Prop_Channel );

	case EvAttr_Pitch:						// pitch attribute
		return (		cmd == EvtType_Note
				||	cmd == EvtType_NoteOff
				||	cmd == EvtType_PolyATouch) ;

	case EvAttr_AttackVelocity:				// attack velocity
	case EvAttr_ReleaseVelocity:				// release velocity
		return (		cmd == EvtType_Note
				||	cmd == EvtType_NoteOff) ;

	case EvAttr_AfterTouch:					// aftertouch value
		return (		cmd == EvtType_ChannelATouch
				||	cmd == EvtType_PolyATouch) ;

	case EvAttr_Program:						// program number attribute
	case EvAttr_ProgramBank:					// program bank number
		return (cmd == EvtType_ProgramChange) ;

	case EvAttr_ControllerNumber:				// controller number
		return (cmd == EvtType_Controller) ;

	case EvAttr_ControllerValue8:				// 8-bit controller value
		if (cmd == EvtType_Controller)
		{
// 		uint8	ctl = controlChange.controller;

				// Questionable...for now I assume that all 16-bit controllers
				// can in fact be set with just the MSB only
			return true;
		}
		return false;
	
	case EvAttr_ControllerValue16:			// 16-bit controller value
		if (cmd == EvtType_Controller)
		{
			uint8	ctl = controlChange.controller;
			return (	ctl <= 31 || ctl >= 98 && ctl <= 101);
		}
		return false;

	case EvAttr_Modulation:					// Modulation value
		return (		cmd == EvtType_Controller
				&&	controlChange.controller == 1 );

	case EvAttr_BendValue:					// 16-bit pitch-bend value
	case EvAttr_InitialBend:					// 16-bit pitch-bend initial value
		return (cmd == EvtType_PitchBend) ;

	case EvAttr_UpdatePeriod:				// 16-bit update period
		return (		cmd == EvtType_PitchBend
				||	cmd == EvtType_Controller
				||	cmd == EvtType_ChannelATouch) ;

	case EvAttr_TempoValue:					// tempo value
		return (cmd == EvtType_Tempo) ;

	case EvAttr_RepeatCount:					// repeat count
		return (cmd == EvtType_Repeat) ;

	case EvAttr_DataSize:						// Size of extended data
		return (cmd == EvtType_SysEx || cmd == EvtType_Text || EvtType_UserEvent) ;

	case EvAttr_SequenceNumber:				// sequence number
		return (cmd == EvtType_Sequence);
		
	case EvAttr_Transposition:				// transposition
		return (cmd == EvtType_Sequence);

	case EvAttr_TSigBeatCount:
	case EvAttr_TSigBeatSize:
		return (cmd == EvtType_TimeSig);
		
	case EvAttr_VPos:
		return HasProperty( Prop_VertPos );

	case EvAttr_CountourLevel:				// level for countour events
	default:
		return false;
	}
}
Exemple #7
0
bool CEvent::SetAttribute( enum E_EventAttribute inAttr, int32 inValue )
{
	uint8		cmd = Command();

	switch (inAttr) {
	case EvAttr_StartTime:					// start time
		SetStart( inValue );
		return true;

	case EvAttr_Duration:						// event duration
		if (HasProperty( Prop_Duration ))
		{
			SetDuration(1 > inValue ? 1 : inValue);
			return true;
		}
		return false;
	
	case EvAttr_StopTime:						// event stop time
		return false;						// Can't set stop -- must set duration

	case EvAttr_Type:						// event type
		SetCommand( CLAMP( EvtType_End, inValue, EvtType_Count - 1 ) );
		return true;

	case EvAttr_Selected:						// Whether it's selected or not
		SetSelected( inValue != 0 );
		return true;
	
	case EvAttr_Channel:						// virtual channel number
		if (HasProperty( Prop_Channel ))
			SetVChannel( CLAMP( 0L, inValue, Max_Destinations ) );
		return true;
	
	case EvAttr_Pitch:						// pitch attribute
		if (	cmd == EvtType_Note || cmd == EvtType_NoteOff)
		{
			note.pitch = CLAMP( 0L, inValue, 127 );
			return true;
		}
		else if (cmd == EvtType_PolyATouch)
		{
			aTouch.pitch = CLAMP( 0L, inValue, 127 );
			return true;
		}
		else return false;

	case EvAttr_AttackVelocity:				// attack velocity
		if (	cmd == EvtType_Note || cmd == EvtType_NoteOff)
		{
			note.attackVelocity = CLAMP( 1L, inValue, 127 );
	
			return true;
		}
		else return false;

	case EvAttr_ReleaseVelocity:				// release velocity
		if (	cmd == EvtType_Note || cmd == EvtType_NoteOff)
		{
			note.releaseVelocity = CLAMP( 0L, inValue, 127 );
			return true;
		}
		else return false;

	case EvAttr_AfterTouch:					// aftertouch value
		if (	cmd == EvtType_PolyATouch)
		{
			aTouch.value = CLAMP( 0L, inValue, 127 );
			return true;
		}
		else return false;

	case EvAttr_Program:						// program number attribute
		if (	cmd == EvtType_ProgramChange)
		{
			programChange.program = CLAMP( 0L, inValue, 127 );
			return true;
		}
		return false;

	case EvAttr_ProgramBank:					// program bank number
		if (	cmd == EvtType_ProgramChange)
		{
			inValue = CLAMP( 0L, inValue, 0x3fff );
			programChange.bankMSB = inValue >> 7;
			programChange.bankLSB = inValue & 0x7f;
			return true;
		}
		return false;

	case EvAttr_VPos:						// arbitrary vertical position
		if (HasProperty( Prop_VertPos )) repeat.vPos = CLAMP( 0L, inValue, 63 );
		return false;

	case EvAttr_ControllerNumber:				// controller number
		if (cmd == EvtType_Controller)
		{
			controlChange.controller = CLAMP( 0L, inValue, 127 );
		}
		return false;

	case EvAttr_ControllerValue8:				// 8-bit controller value
		if (cmd == EvtType_Controller)
		{
			controlChange.MSB = CLAMP( 0L, inValue, 127 );
			controlChange.LSB = 0;
		}
		return false;

	case EvAttr_ControllerValue16:			// 16-bit controller value
		if (	cmd == EvtType_Controller)
		{
			inValue = CLAMP( 0L, inValue, 0x3fff );
			controlChange.MSB = inValue >> 7;
			controlChange.LSB = inValue & 0x7f;
			return true;
		}
Exemple #8
0
bool	CAHALAudioDevice::HasJackControl(AudioObjectPropertyScope inScope, UInt32 inChannel) const
{
	CAPropertyAddress theAddress(kAudioDevicePropertyJackIsConnected, inScope, inChannel);
	return HasProperty(theAddress);
}
Exemple #9
0
bool	CAHALAudioDevice::HasiSubOwnerControl(AudioObjectPropertyScope inScope, UInt32 inChannel) const
{
	CAPropertyAddress theAddress(kAudioDevicePropertyDriverShouldOwniSub, inScope, inChannel);
	return HasProperty(theAddress);
}
Exemple #10
0
bool	CAHALAudioDevice::HasSubVolumeControl(AudioObjectPropertyScope inScope, UInt32 inChannel) const
{
	CAPropertyAddress theAddress(kAudioDevicePropertySubVolumeScalar, inScope, inChannel);
	return HasProperty(theAddress);
}
Exemple #11
0
bool	CAHALAudioDevice::HasModelUID() const
{
	CAPropertyAddress theAddress(kAudioDevicePropertyModelUID);
	return HasProperty(theAddress);
}
Exemple #12
0
bool	CAHALAudioDevice::HasIOBufferSizeRange() const
{
	CAPropertyAddress theAddress(kAudioDevicePropertyBufferFrameSizeRange);
	return HasProperty(theAddress);
}
Exemple #13
0
bool	CAHALAudioDevice::UsesVariableIOBufferSizes() const
{
	CAPropertyAddress theAddress(kAudioDevicePropertyUsesVariableBufferFrameSizes);
	return HasProperty(theAddress);
}
Exemple #14
0
bool	CAHALAudioDevice::HasClockDomain() const
{
	CAPropertyAddress theAddress(kAudioDevicePropertyClockDomain);
	return HasProperty(theAddress);
}
CObject* CP_AbstractBaseExt::GetCObjPtProperties(string propertyName) const{
	ASSERT(HasProperty(propertyName));
	return m_extCObjPtProperties.at(propertyName);
}
Exemple #16
0
bool	CAHALAudioDevice::HasDataSourceControl(AudioObjectPropertyScope inScope, UInt32 inChannel) const
{
	CAPropertyAddress theAddress(kAudioDevicePropertyDataSource, inScope, inChannel);
	return HasProperty(theAddress);
}
CP_BaseGeometricType* CP_AbstractBaseExt::GetBaseGeoProperties(string propertyName) const{
	ASSERT(HasProperty(propertyName));
	return m_extBaseGeoProperties.at(propertyName);
}
	//-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
	// FeatureControl::HasTune()
	//-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
	bool FeatureControl::HasTune() const
	{
		return HasProperty(PropertyAddress(kCMIOFeatureControlPropertyTune));
	}
Exemple #19
0
int32 CEvent::GetAttribute( enum E_EventAttribute inAttr ) const
{
	uint8		cmd = Command();

	switch (inAttr) {
	case EvAttr_StartTime:					// start time
		return Start();

	case EvAttr_Duration:						// event duration
		if (HasProperty( Prop_Duration )) return Duration();
		return -1;
	
	case EvAttr_StopTime:						// event stop time
		if (HasProperty( Prop_Duration )) return Stop();
		return -1;

	case EvAttr_Type:						// event type
		return Command();

	case EvAttr_Selected:						// Whether it's selected or not
		return IsSelected();
	
	case EvAttr_Channel:						// virtual channel number
		if (HasProperty( Prop_Channel )) return GetVChannel();
		return -1;
	
	case EvAttr_Pitch:						// pitch attribute
		if (	cmd == EvtType_Note || cmd == EvtType_NoteOff)
			return note.pitch;
		else if (cmd == EvtType_PolyATouch)
			return aTouch.pitch;
		else return -1;

	case EvAttr_AttackVelocity:				// attack velocity
		if (	cmd == EvtType_Note || cmd == EvtType_NoteOff)
			return note.attackVelocity;
		else return -1;

	case EvAttr_ReleaseVelocity:				// release velocity
		if (	cmd == EvtType_Note || cmd == EvtType_NoteOff)
			return note.releaseVelocity;
		else return -1;

	case EvAttr_AfterTouch:					// aftertouch value
		if (	cmd == EvtType_PolyATouch) return aTouch.value;
		else return -1;

	case EvAttr_Program:						// program number attribute
		if (	cmd == EvtType_ProgramChange) return programChange.program;
		else return -1;

	case EvAttr_ProgramBank:					// program bank number
		if (	cmd == EvtType_ProgramChange)
			return (programChange.bankMSB << 7) | programChange.bankLSB;
		else return -1;

	case EvAttr_VPos:						// arbitrary vertical position
		if (HasProperty( Prop_VertPos )) return repeat.vPos;
		return -1;

	case EvAttr_ControllerNumber:				// controller number
		if (cmd == EvtType_Controller) return controlChange.controller;
		return -1;

	case EvAttr_ControllerValue8:				// 8-bit controller value
		if (cmd == EvtType_Controller) return controlChange.MSB;
		return -1;

	case EvAttr_ControllerValue16:			// 16-bit controller value
		if (cmd == EvtType_Controller)
			return (controlChange.MSB << 7) | controlChange.LSB;
		return -1;

	case EvAttr_BendValue:					// 16-bit pitch-bend value
		if (cmd == EvtType_PitchBend) return pitchBend.targetBend - 0x2000;
		return -1;

	case EvAttr_InitialBend:						// 16-bit pitch-bend value
		if (cmd == EvtType_PitchBend) return pitchBend.startBend - 0x2000;
		return -1;

	case EvAttr_UpdatePeriod:				// update period in ticks
		if (cmd == EvtType_PitchBend || cmd == EvtType_Controller || cmd == EvtType_ChannelATouch)
			return pitchBend.updatePeriod;
		return -1;

	case EvAttr_TempoValue:					// tempo value
		if (cmd == EvtType_Tempo) return tempo.newTempo;
		return -1;

	case EvAttr_RepeatCount:					// repeat count
		if (cmd == EvtType_Repeat) return repeat.repeatCount;
		return -1;

	case EvAttr_SequenceNumber:				// sequence number
		if (cmd == EvtType_Sequence) return sequence.sequence;
		return -1;

	case EvAttr_Transposition:				// transposition
		if (cmd == EvtType_Sequence) return sequence.transposition;
		return -1;

	case EvAttr_Modulation:					// Modulation value
		if (		cmd == EvtType_Controller
			&&	controlChange.controller == 1)
		{
			return (controlChange.MSB << 7) | controlChange.LSB;
		}
		return -1;

	case EvAttr_TSigBeatCount:
		if (cmd == EvtType_TimeSig) return sigChange.numerator;
		return -1;

	case EvAttr_TSigBeatSize:
		if (cmd == EvtType_TimeSig) return sigChange.denominator;
		return -1;

	case EvAttr_CountourLevel:				// level for countour events
	case EvAttr_DataSize:						// Size of extended data
	default:
		return -1;
	}
}
	//-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
	// FeatureControl::HasNativeValue()
	//-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
	bool FeatureControl::HasNativeValue() const
	{
		return HasProperty(PropertyAddress(kCMIOFeatureControlPropertyNativeValue));
	}
 BOOL ModuleNamespace::HasOwnProperty(PropertyId propertyId)
 {
     return HasProperty(propertyId);
 }
	//-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
	// FeatureControl::HasAbsoluteValue()
	//-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
	bool FeatureControl::HasAbsoluteValue() const
	{
		return HasProperty(PropertyAddress(kCMIOFeatureControlPropertyAbsoluteValue));
	}
	//-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
	// HasExcludeNonDALAccess()
	//-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
	bool Device::HasExcludeNonDALAccess() const
	{
		return HasProperty(PropertyAddress(kCMIODevicePropertyExcludeNonDALAccess));
	}
	//-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
	// FeatureControl::HasAbsoluteToNative()
	//-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
	bool FeatureControl::HasAbsoluteToNative() const
	{
		return HasProperty(PropertyAddress(kCMIOFeatureControlPropertyConvertAbsoluteToNative));
	}
	bool Device::HasSuspendedByUser() const
	{
		return HasProperty(PropertyAddress(kCMIODevicePropertySuspendedByUser));
	}
bool CSVNStatusListCtrl::PropertyList::IsNeedsLockSet() const
{
    static const CString svnNeedsLock (SVN_PROP_NEEDS_LOCK);
    return HasProperty (svnNeedsLock);
}
Exemple #27
0
int CInformationPanel::CItem::GetButtonCount() const
{
	return HasProperty() ? 1 : 0;
}
int CP_AbstractBaseExt::GetIntegralProperties(string propertyName) const {
	ASSERT(HasProperty(propertyName));
	return m_extIntProperties.at(propertyName);
}
Exemple #29
0
bool CGitStatusListCtrl::PropertyList::IsNeedsLockSet() const
{
	static const CString svnNeedsLock = _T("svn:needs-lock");
	return HasProperty (svnNeedsLock);
}
Exemple #30
0
bool	CAHALAudioDevice::HasDevicePlugInStatus() const
{
	CAPropertyAddress theAddress(kAudioDevicePropertyPlugIn);
	return HasProperty(theAddress);
}