本文整理汇总了C++中CChannel::GetTransport方法的典型用法代码示例。如果您正苦于以下问题:C++ CChannel::GetTransport方法的具体用法?C++ CChannel::GetTransport怎么用?C++ CChannel::GetTransport使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CChannel
的用法示例。
在下文中一共展示了CChannel::GetTransport方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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);
//.........这里部分代码省略.........
示例2: RestoreUndoState
//.........这里部分代码省略.........
Chan->SetTransportAndPos(uap->m_Transport, uap->m_Pos);
}
}
break;
case UCODE_GO:
{
GO_UNDO_STATE *uap;
GetUndoArray(uap, State);
for (int i = 0; i < UValItems(State); i++, uap++) {
CChannel *Chan = GetChan(uap->m_ChanIdx);
for (int j = 0; j < CChanInfo::AUTOS; j++) {
Chan->GetAuto(j)->SetTransport(uap->m_Auto[j].m_Transport);
Chan->GetAuto(j)->SetNormPos(uap->m_Auto[j].m_Pos);
}
Chan->SetTransportAndPos(uap->m_Transport, uap->m_Pos);
}
}
break;
case UCODE_LOOP:
{
bool *uap;
GetUndoArray(uap, State);
for (int i = 0; i < UValItems(State); i++)
GetChan(i)->SetLoop(uap[i]);
}
break;
case UCODE_MUTE:
{
bool *uap;
GetUndoArray(uap, State);
for (int i = 0; i < UValItems(State); i++)
GetChan(i)->SetMute(uap[i]);
}
break;
case UCODE_SOLO:
case UCODE_END_SOLO:
{
bool *uap;
GetUndoArray(uap, State);
for (int i = 0; i < UValItems(State); i++)
GetChan(i)->SetSolo(uap[i]);
}
break;
case UCODE_KEEP_SOLO:
{
BYTE *uap;
GetUndoArray(uap, State);
for (int i = 0; i < UValItems(State); i++) {
GetChan(i)->SetMute((uap[i] & 0x1) != 0);
GetChan(i)->SetSolo((uap[i] & 0x2) != 0);
}
}
break;
case UCODE_LOAD_AUDIO:
{
CChanInfo *uap;
GetUndoArray(uap, State);
if ((UValFlags(State) & UFLAG_DIR) == UFLAG_INS) {
GetChan(uap->m_Index)->OpenItem(uap);
GetChan(uap->m_Index)->SetInfo(uap);
} else
GetChan(uap->m_Index)->Reset();
}
break;
case UCODE_INSERT_AUDIO:
RestoreUndoItems(State);
break;
case UCODE_SHOW_VOLUME:
case UCODE_SHOW_SNAPSHOT:
case UCODE_SHOW_MS_FADE:
case UCODE_SHOW_TEMPO:
ShowDlgBar(UValBarNum(State) - 1, UValShowBar(State) != 0);
break;
case UCODE_SET_DEFAULTS:
{
CChanInfo *uap;
GetUndoArray(uap, State);
m_ChanDefaults = *uap;
}
break;
case UCODE_EDIT_AUTO:
{
CEditAutoUndoState *uap;
GetUndoArray(uap, State);
for (int i = 0; i < UValItems(State); i++, uap++) {
CChannel *Chan = GetChan(uap->m_ChanIdx);
CAutoSliderCtrl *Auto = Chan->GetAuto(UValAutoIdx(State));
Auto->SetInfoNotify(*uap); // calls OnNewPos and OnSelection
Chan->SetLoop(uap->m_ChanLoop != 0);
// if channel transport changed, restore it and audio position
if (uap->m_ChanTransport != Chan->GetTransport())
Chan->SetTransportAndPos(uap->m_ChanTransport, uap->m_ChanPos);
}
}
break;
default:
NODEFAULTCASE;
}
SetCurPos(UValCurPos(State));
}
示例3:
CBaseBehaviour::CBaseBehaviour(CChannel& channel) :
m_id(channel.GetId()), m_server(channel.GetServer()), m_logger(channel.GetLogger()),
m_params(channel.GetParameters()), m_state(channel.GetState()), m_transport(channel.GetTransport())
{
}