当前位置: 首页>>代码示例>>C++>>正文


C++ CChannel::GetLoop方法代码示例

本文整理汇总了C++中CChannel::GetLoop方法的典型用法代码示例。如果您正苦于以下问题:C++ CChannel::GetLoop方法的具体用法?C++ CChannel::GetLoop怎么用?C++ CChannel::GetLoop使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在CChannel的用法示例。


在下文中一共展示了CChannel::GetLoop方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: SaveUndoState

void CMixereView::SaveUndoState(CUndoState& State)
{
	if (State.GetCode() < START_UCODE) {	// if base class undo code
		CFormListView::SaveUndoState(State);	// defer to base class
		return;
	}
	if (State.GetCode() > END_UCODE) {		// if snapshot undo code
		m_Snapshot->SaveUndoState(State);		// defer to snapshot class
		return;
	}
	int	Chans = GetItemCount();
	UValCurPos(State) = m_CurPos;	// do first so handlers can override
	switch (State.GetCode()) {
	case UCODE_TRANSPORT:
		{
			TRANSPORT_UNDO_STATE	*uap;
			if (State.IsEmpty()) {	// if first time
				AllocUndoArray(uap, State, max(m_Selections, 1));
				SetUndoChanIdxs(uap);	// set each element's channel index
			} else
				GetUndoArray(uap, State);
			for (int i = 0; i < UValItems(State); i++, uap++) {
				CChannel	*Chan = GetChan(uap->m_ChanIdx);
				uap->m_Transport = Chan->GetTransport();
				uap->m_Pos = Chan->GetPosition();
			}
		}
		break;
	case UCODE_GO:
		{
			GO_UNDO_STATE	*uap;
			if (State.IsEmpty()) {	// if first time
				AllocUndoArray(uap, State, max(m_Selections, 1));
				SetUndoChanIdxs(uap);	// set each element's channel index
			} else
				GetUndoArray(uap, State);
			for (int i = 0; i < UValItems(State); i++, uap++) {
				CChannel	*Chan = GetChan(uap->m_ChanIdx);
				uap->m_Transport = Chan->GetTransport();
				uap->m_Pos = Chan->GetPosition();
				for (int j = 0; j < CChanInfo::AUTOS; j++) {
					uap->m_Auto[j].m_Transport = Chan->GetAuto(j)->GetTransport();
					uap->m_Auto[j].m_Pos = Chan->GetAuto(j)->GetNormPos();
				}
			}
		}
		break;
	case UCODE_LOOP:
		{
			bool	*uap;
			AllocUndoArray(uap, State, Chans);
			for (int i = 0; i < Chans; i++)
				uap[i] = GetChan(i)->GetLoop();
		}
		break;
	case UCODE_MUTE:
		{
			bool	*uap;
			AllocUndoArray(uap, State, Chans);
			for (int i = 0; i < Chans; i++)
				uap[i] = GetChan(i)->GetMute();
		}
		break;
	case UCODE_SOLO:
	case UCODE_END_SOLO:
		{
			bool	*uap;
			AllocUndoArray(uap, State, Chans);
			for (int i = 0; i < Chans; i++)
				uap[i] = GetChan(i)->GetSolo();
		}
		break;
	case UCODE_KEEP_SOLO:
		{
			BYTE	*uap;
			AllocUndoArray(uap, State, Chans);
			for (int i = 0; i < Chans; i++)
				uap[i] = GetChan(i)->GetMute() + (GetChan(i)->GetSolo() << 1);
		}
		break;
	case UCODE_LOAD_AUDIO:
	case UCODE_INSERT_AUDIO:
		if (!UValFlags(State)) {
			// override current position with pre-insert position
			UValCurPos(State) = m_PrevPos;
			CChanInfo	*uap;
			AllocUndoArray(uap, State, 1);
			GetChan(m_CurPos)->GetInfo(uap);
			UValFlags(State) = UFLAG_DEL;	// first restore will delete
		} else
			UValFlags(State) ^= UFLAG_DIR;	// reverse direction
		break;
	case UCODE_SHOW_VOLUME:
	case UCODE_SHOW_SNAPSHOT:
	case UCODE_SHOW_MS_FADE:
	case UCODE_SHOW_TEMPO:
		if (!UValBarNum(State))	// if first time (zero bar number)
			// assume m_UndoIdx contains notifier's dialog bar index
			UValBarNum(State) = m_UndoIdx + 1;	// zero is reserved for first time
		UValShowBar(State) = IsDlgBarVisible(UValBarNum(State) - 1);
//.........这里部分代码省略.........
开发者ID:victimofleisure,项目名称:Mixere,代码行数:101,代码来源:MixereView.cpp


注:本文中的CChannel::GetLoop方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。