本文整理汇总了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);
//.........这里部分代码省略.........