• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C++ GetSetMediaTrackInfo函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C++中GetSetMediaTrackInfo函数的典型用法代码示例。如果您正苦于以下问题:C++ GetSetMediaTrackInfo函数的具体用法?C++ GetSetMediaTrackInfo怎么用?C++ GetSetMediaTrackInfo使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



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

示例1: ResolveMissingRecv

// Return TRUE on delete send
bool ResolveMissingRecv(MediaTrack* tr, int iSend, TrackSend* ts, WDL_PtrList<TrackSendFix>* pFix)
{
	WDL_FastString str;
	char* cName = (char*)GetSetMediaTrackInfo(tr, "P_NAME", NULL);
	if (!cName || !cName[0])
		cName = (char*)__LOCALIZE("(unnamed)","sws_DLG_114");
	str.SetFormatted(200, __LOCALIZE_VERFMT("Send %d on track %d \"%s\" is missing its receive track!","sws_DLG_114"), iSend+1, CSurf_TrackToID(tr, false), cName);

	g_cErrorStr = str.Get();
	g_ts = ts;
	g_send = tr;
	g_recv = NULL;

	DialogBox(g_hInst, MAKEINTRESOURCE(IDD_RECVMISSING), g_hwndParent, doResolve);

	if (g_iResolveRet == 1)
		return true;
	else if (g_iResolveRet == 2)
	{
		GUID* newGuid = (GUID*)GetSetMediaTrackInfo(g_recv, "GUID", NULL);
		if (pFix)
			pFix->Add(new TrackSendFix(ts->GetGuid(), newGuid));
		ts->SetGuid(newGuid);
	}

	return false;
}
开发者ID:AusRedNeck,项目名称:sws,代码行数:28,代码来源:TrackSends.cpp


示例2: ToggleWriteEnvExists

void ToggleWriteEnvExists(COMMAND_T* _ct)
{
	bool updated = false;
	// restore write modes
	if (g_toolbarAutoModeToggles.GetSize())
	{
		for (int i=0; i < g_toolbarAutoModeToggles.GetSize(); i++)
		{
			SNM_TrackInt* tri = g_toolbarAutoModeToggles.Get(i);
			GetSetMediaTrackInfo(tri->m_tr, "I_AUTOMODE", &(tri->m_int));
			updated = true;
		}
		g_toolbarAutoModeToggles.Empty(true);
	}
	// set read mode and store previous write modes
	else
	{
		for (int i=0; i <= GetNumTracks(); i++) // incl. master
		{
			MediaTrack* tr = CSurf_TrackFromID(i, false); 
			int autoMode = tr ? *(int*)GetSetMediaTrackInfo(tr, "I_AUTOMODE", NULL) : -1;
			if (autoMode >= 2 /* touch */ && autoMode <= 4 /* latch */)
			{
				GetSetMediaTrackInfo(tr, "I_AUTOMODE", &g_i1); // set read mode
				g_toolbarAutoModeToggles.Add(new SNM_TrackInt(tr, autoMode));
				updated = true;
			}
		}
	}

	if (updated) {
		Undo_OnStateChangeEx2(NULL, SWS_CMD_SHORTNAME(_ct), UNDO_STATE_ALL, -1);
		RefreshToolbar(SWSGetCommandID(ToggleWriteEnvExists)); // in case auto-refresh toolbar option is off..
	}
}
开发者ID:AusRedNeck,项目名称:sws,代码行数:35,代码来源:SnM_Track.cpp


示例3: SetTracksFolderState

// I_FOLDERDEPTH :
//  0=normal, 1=track is a folder parent, 
// -1=track is the last in the innermost folder
// -2=track is the last in the innermost and next-innermost folders, etc
void SetTracksFolderState(COMMAND_T* _ct)
{
	bool updated = false;
	for (int i=1; i <= GetNumTracks(); i++) // skip master
	{
		MediaTrack* tr = CSurf_TrackFromID(i, false);
		if (tr && *(int*)GetSetMediaTrackInfo(tr, "I_SELECTED", NULL))
		{
			int newState = (int)_ct->user;
			int curState = *(int*)GetSetMediaTrackInfo(tr, "I_FOLDERDEPTH", NULL);
			if ((int)_ct->user == -1) // last in folder?
			{
				if (SNM_GetTrackDepth(tr)>0)
					newState = curState<0 ? curState-1 : -1;
				else
					newState = curState;
			}
			else if ((int)_ct->user == -2) // very last in folder?
			{
				int depth = SNM_GetTrackDepth(tr);
				if (depth>0)
					newState = depth * (-1);
				else
					newState = curState;
			}

			if (curState!=newState) {
				GetSetMediaTrackInfo(tr, "I_FOLDERDEPTH", &newState);
				updated = true;
			}
		}
	}
	if (updated)
		Undo_OnStateChangeEx2(NULL, SWS_CMD_SHORTNAME(_ct), UNDO_STATE_ALL, -1);
}
开发者ID:AusRedNeck,项目名称:sws,代码行数:39,代码来源:SnM_Track.cpp


示例4: RestoreTracksFolderStates

void RestoreTracksFolderStates(COMMAND_T* _ct)
{
	bool updated = false;
	const char* strState = !_ct->user ? "I_FOLDERDEPTH" : "I_FOLDERCOMPACT";
	WDL_PtrList_DeleteOnDestroy<SNM_TrackInt>* saveList = !_ct->user ? &g_trackFolderStates : &g_trackFolderCompactStates;
	for (int i=1; i <= GetNumTracks(); i++) // skip master
	{
		MediaTrack* tr = CSurf_TrackFromID(i, false);
		if (tr && *(int*)GetSetMediaTrackInfo(tr, "I_SELECTED", NULL))
		{
			for(int j=0; j < saveList->GetSize(); j++)
			{
				SNM_TrackInt* savedTF = saveList->Get(j);
				int current = *(int*)GetSetMediaTrackInfo(tr, strState, NULL);
				if (savedTF->m_tr == tr && 
					((!_ct->user && savedTF->m_int != current) ||
					(_ct->user && *(int*)GetSetMediaTrackInfo(tr, "I_FOLDERDEPTH", NULL) == 1 && savedTF->m_int != current)))
				{
					GetSetMediaTrackInfo(tr, strState, &(savedTF->m_int));
					updated = true;
					break;
				}
			}
		}
	}
	if (updated)
		Undo_OnStateChangeEx2(NULL, SWS_CMD_SHORTNAME(_ct), UNDO_STATE_ALL, -1);
}
开发者ID:AusRedNeck,项目名称:sws,代码行数:28,代码来源:SnM_Track.cpp


示例5: ColorChildren

void ColorChildren(COMMAND_T* = NULL)
{
	int iParentDepth;
	COLORREF crParentColor;
	bool bSelected = false;
	MediaTrack* gfd = NULL;
	for (int i = 1; i <= GetNumTracks(); i++)
	{
		MediaTrack* tr = CSurf_TrackFromID(i, false);
		int iType;
		int iFolder = GetFolderDepth(tr, &iType, &gfd);

		if (bSelected)
			GetSetMediaTrackInfo(tr, "I_CUSTOMCOLOR", &crParentColor);

		if (iType == 1)
		{
			if (!bSelected && *(int*)GetSetMediaTrackInfo(tr, "I_SELECTED", NULL))
			{
				iParentDepth = iFolder;
				bSelected = true;
			}
			crParentColor = *(COLORREF*)GetSetMediaTrackInfo(tr, "I_CUSTOMCOLOR", NULL);
		}

		if (iType + iFolder <= iParentDepth)
			bSelected = false;
	}
	Undo_OnStateChangeEx(__LOCALIZE("Set track(s) children to same color","sws_undo"), UNDO_STATE_TRACKCFG, -1);
}
开发者ID:wolqws,项目名称:sws,代码行数:30,代码来源:Color.cpp


示例6: RecSrcOut

void RecSrcOut(COMMAND_T* = NULL)
{
	// Set the rec source to output
	// Set to mono or stereo based on first item
	for (int i = 1; i <= GetNumTracks(); i++)
	{
		int iMode = 1; // 5 = mono, 1 = stereo
		MediaTrack* tr = CSurf_TrackFromID(i, false);
		if (*(int*)GetSetMediaTrackInfo(tr, "I_SELECTED", NULL))
		{
			if (GetTrackNumMediaItems(tr))
			{
				MediaItem* mi = GetTrackMediaItem(tr, 0);
				if (GetMediaItemNumTakes(mi))
				{
					MediaItem_Take* mit = GetMediaItemTake(mi, 0);
					PCM_source* p = (PCM_source*)GetSetMediaItemTakeInfo(mit, "P_SOURCE", NULL);
					if (p && p->GetNumChannels() == 1)
						iMode = 5;

				}
			}
			GetSetMediaTrackInfo(tr, "I_RECMODE", &iMode);
		}
	}
}
开发者ID:AusRedNeck,项目名称:sws,代码行数:26,代码来源:TrackParams.cpp


示例7: RemapMIDIInputChannel

void RemapMIDIInputChannel(COMMAND_T* _ct)
{
	bool updated = false;
	int ch = (int)_ct->user; // 0: source channel

	char pLine[SNM_MAX_CHUNK_LINE_LENGTH] = "";
	if (ch && _snprintfStrict(pLine, sizeof(pLine), "MIDI_INPUT_CHANMAP %d\n", ch-1) <= 0)
		return;

	for (int i=1; i <= GetNumTracks(); i++) // skip master
	{
		MediaTrack* tr = CSurf_TrackFromID(i, false);
		if (tr && *(int*)GetSetMediaTrackInfo(tr, "I_SELECTED", NULL))
		{
			int in = *(int*)GetSetMediaTrackInfo(tr, "I_RECINPUT", NULL);
			if ((in & 0x1000) == 0x1000) // midi in?
			{
				SNM_ChunkParserPatcher p(tr);
				char currentCh[3] = "";
				int chunkPos = p.Parse(SNM_GET_CHUNK_CHAR, 1, "TRACK", "MIDI_INPUT_CHANMAP", 0, 1, currentCh, NULL, "TRACKID");
				if (chunkPos > 0) {
					if (!ch || atoi(currentCh) != (ch-1))
						updated |= p.ReplaceLine(--chunkPos, pLine); // pLine can be "", i.e. remove line
				}
				else
					updated |= p.InsertAfterBefore(0, pLine, "TRACK", "TRACKHEIGHT", 1, 0, "TRACKID");
			}
		}
	}
	if (updated)
		Undo_OnStateChangeEx2(NULL, SWS_CMD_SHORTNAME(_ct), UNDO_STATE_ALL, -1);
}
开发者ID:AusRedNeck,项目名称:sws,代码行数:32,代码来源:SnM_Track.cpp


示例8: CustomColorAll

void CustomColorAll(COMMAND_T*)
{	
	// Get the first selected track
	for (int i = 1; i <= GetNumTracks(); i++)
	{
		MediaTrack* tr = CSurf_TrackFromID(i, false);
		if (*(int*)GetSetMediaTrackInfo(tr, "I_SELECTED", NULL))
		{
			Undo_BeginBlock();
			Main_OnCommand(40357, 0); // Set track(s) to one custom color
			// Assume the user clicked 'OK' in the color picker!
			COLORREF cr = *(COLORREF*)GetSetMediaTrackInfo(tr, "I_CUSTOMCOLOR", NULL);
			for (int i = 1; i <= GetNumTracks(); i++)
			{
				tr = CSurf_TrackFromID(i, false);
				for (int j = 0; j < GetTrackNumMediaItems(tr); j++)
				{
					MediaItem* mi = GetTrackMediaItem(tr, j);
					if (*(bool*)GetSetMediaItemInfo(mi, "B_UISEL", NULL))
						GetSetMediaItemInfo(mi, "I_CUSTOMCOLOR", &cr);
				}
			}
			UpdateTimeline();
			Undo_EndBlock(__LOCALIZE("Set selected track(s)/item(s) to custom color","sws_undo"), UNDO_STATE_ALL);
			return;
		}
	}
	// No tracks selected so just run the item action
	Main_OnCommand(40704, 0); // Set item(s) to one custom color
}
开发者ID:wolqws,项目名称:sws,代码行数:30,代码来源:Color.cpp


示例9: switch

void SWS_TrackListView::GetItemText(SWS_ListItem* item, int iCol, char* str, int iStrMax)
{
	MediaTrack* tr = (MediaTrack*)item;
	if (tr)
	{
		switch (iCol)
		{
		case COL_NUM: // #
			_snprintf(str, iStrMax, "%d", CSurf_TrackToID(tr, false));
			break;
		case COL_NAME: // Name
			lstrcpyn(str, (char*)GetSetMediaTrackInfo(tr, "P_NAME", NULL), iStrMax);
			break;
		case COL_TCP: // TCP
			lstrcpyn(str, GetTrackVis(tr) & 2 ? UTF8_BULLET : UTF8_CIRCLE, iStrMax);
			break;
		case COL_MCP: // MCP
			lstrcpyn(str, GetTrackVis(tr) & 1 ? UTF8_BULLET : UTF8_CIRCLE, iStrMax);
			break;
		case COL_ARM:
			lstrcpyn(str, *(int*)GetSetMediaTrackInfo(tr, "I_RECARM", NULL) ? UTF8_BULLET : UTF8_CIRCLE, iStrMax);
			break;
		case COL_MUTE:
			lstrcpyn(str, *(bool*)GetSetMediaTrackInfo(tr, "B_MUTE", NULL) ? UTF8_BULLET : UTF8_CIRCLE, iStrMax);
			break;
		case COL_SOLO:
			lstrcpyn(str, *(int*)GetSetMediaTrackInfo(tr, "I_SOLO", NULL) ? UTF8_BULLET : UTF8_CIRCLE, iStrMax);
			break;
//		case COL_INPUT:
//			_snprintf(str, iStrMax, "%d", *(int*)GetSetMediaTrackInfo(tr, "I_RECINPUT", NULL) + 1);
//			break;
		}
	}
}
开发者ID:AusRedNeck,项目名称:sws,代码行数:34,代码来源:Tracklist.cpp


示例10: GetSetMediaTrackInfo

void SWS_TrackListView::OnItemSelChanged(SWS_ListItem* item, int iState)
{
	MediaTrack* tr = (MediaTrack*)item;
	if (iState & LVIS_FOCUSED)
		g_pList->m_trLastTouched = tr;
	if ((iState & LVIS_SELECTED ? true : false) != (*(int*)GetSetMediaTrackInfo(tr, "I_SELECTED", NULL) ? true : false))
		GetSetMediaTrackInfo(tr, "I_SELECTED", iState & LVIS_SELECTED ? &g_i1 : &g_i0);
}
开发者ID:AusRedNeck,项目名称:sws,代码行数:8,代码来源:Tracklist.cpp


示例11: DisableMPSend

void DisableMPSend(COMMAND_T* = NULL)
{
	for (int i = 1; i <= GetNumTracks(); i++)
	{
		MediaTrack* tr = CSurf_TrackFromID(i, false);
		if (*(int*)GetSetMediaTrackInfo(tr, "I_SELECTED", NULL))
			GetSetMediaTrackInfo(tr, "B_MAINSEND", &g_bFalse);
	}
}
开发者ID:AusRedNeck,项目名称:sws,代码行数:9,代码来源:TrackParams.cpp


示例12: UnbypassFX

void UnbypassFX(COMMAND_T* = NULL)
{
	for (int i = 0; i <= GetNumTracks(); i++)
	{
		MediaTrack* tr = CSurf_TrackFromID(i, false);
		if (*(int*)GetSetMediaTrackInfo(tr, "I_SELECTED", NULL))
			GetSetMediaTrackInfo(tr, "I_FXEN", &g_i1);
	}
}
开发者ID:AusRedNeck,项目名称:sws,代码行数:9,代码来源:TrackParams.cpp


示例13: UnsetMonMedia

void UnsetMonMedia(COMMAND_T* = NULL)
{
	for (int i = 1; i <= GetNumTracks(); i++)
	{
		MediaTrack* tr = CSurf_TrackFromID(i, false);
		if (*(int*)GetSetMediaTrackInfo(tr, "I_SELECTED", NULL))
			GetSetMediaTrackInfo(tr, "I_RECMONITEMS", &g_i0);
	}
}
开发者ID:AusRedNeck,项目名称:sws,代码行数:9,代码来源:TrackParams.cpp


示例14: ColorTrackNext

void ColorTrackNext(COMMAND_T* = NULL)
{
	for (int i = 0; i < GetNumTracks(); i++)
	{
		MediaTrack* tr = CSurf_TrackFromID(i, false);
		if (*(int*)GetSetMediaTrackInfo(tr, "I_SELECTED", NULL))
			GetSetMediaTrackInfo(tr, "I_CUSTOMCOLOR", GetSetMediaTrackInfo(CSurf_TrackFromID(i+1, false), "I_CUSTOMCOLOR", NULL));
	}
	Undo_OnStateChangeEx(__LOCALIZE("Set track(s) to previous track's color","sws_undo"), UNDO_STATE_TRACKCFG, -1);
}
开发者ID:wolqws,项目名称:sws,代码行数:10,代码来源:Color.cpp


示例15: MinimizeTracks

void MinimizeTracks(COMMAND_T* = NULL)
{
	for (int i = 0; i <= GetNumTracks(); i++)
	{
		MediaTrack* tr = CSurf_TrackFromID(i, false);
		if (*(int*)GetSetMediaTrackInfo(tr, "I_SELECTED", NULL))
			GetSetMediaTrackInfo(tr, "I_HEIGHTOVERRIDE", &g_i1);
	}
	TrackList_AdjustWindows(false);
	UpdateTimeline();
}
开发者ID:AusRedNeck,项目名称:sws,代码行数:11,代码来源:TrackParams.cpp


示例16: BlackTrack

void BlackTrack(COMMAND_T* = NULL)
{
	int iBlack = 0x1000000 | RGB(0, 0, 0);
	for (int i = 0; i <= GetNumTracks(); i++)
	{
		MediaTrack* tr = CSurf_TrackFromID(i, false);
		if (*(int*)GetSetMediaTrackInfo(tr, "I_SELECTED", NULL))
			GetSetMediaTrackInfo(tr, "I_CUSTOMCOLOR", &iBlack);
	}
	Undo_OnStateChangeEx(__LOCALIZE("Set track(s) color black","sws_undo"), UNDO_STATE_TRACKCFG, -1);
}
开发者ID:wolqws,项目名称:sws,代码行数:11,代码来源:Color.cpp


示例17: SaveTracksFolderStates

void SaveTracksFolderStates(COMMAND_T* _ct)
{
	const char* strState = !_ct->user ? "I_FOLDERDEPTH" : "I_FOLDERCOMPACT";
	WDL_PtrList_DeleteOnDestroy<SNM_TrackInt>* saveList = !_ct->user ? &g_trackFolderStates : &g_trackFolderCompactStates;
	saveList->Empty(true);
	for (int i=1; i <= GetNumTracks(); i++) // skip master
	{
		MediaTrack* tr = CSurf_TrackFromID(i, false);
		if (tr && *(int*)GetSetMediaTrackInfo(tr, "I_SELECTED", NULL))
			saveList->Add(new SNM_TrackInt(tr, *(int*)GetSetMediaTrackInfo(tr, strState, NULL)));
	}
}
开发者ID:AusRedNeck,项目名称:sws,代码行数:12,代码来源:SnM_Track.cpp


示例18: GetTrackVis

int GetTrackVis(MediaTrack* tr) // &1 == mcp, &2 == tcp
{
	int iTrack = CSurf_TrackToID(tr, false);
	if (iTrack == 0)
		return *(int*)GetConfigVar("showmaintrack") ? 3 : 1; // For now, always return master vis in MCP
	else if (iTrack < 0)
		return 0;

	int iVis = *(bool*)GetSetMediaTrackInfo(tr, "B_SHOWINMIXER", NULL) ? 1 : 0;
	iVis    |= *(bool*)GetSetMediaTrackInfo(tr, "B_SHOWINTCP", NULL) ? 2 : 0;
	return iVis;
}
开发者ID:Lazzle,项目名称:sws,代码行数:12,代码来源:sws_util.cpp


示例19: TogMPSend

void TogMPSend(COMMAND_T* = NULL)
{
	bool bMPSend;
	for (int i = 1; i <= GetNumTracks(); i++)
	{
		MediaTrack* tr = CSurf_TrackFromID(i, false);
		if (*(int*)GetSetMediaTrackInfo(tr, "I_SELECTED", NULL))
		{
			bMPSend = !*(bool*)GetSetMediaTrackInfo(tr, "B_MAINSEND", NULL);
			GetSetMediaTrackInfo(tr, "B_MAINSEND", &bMPSend);
		}
	}
}
开发者ID:AusRedNeck,项目名称:sws,代码行数:13,代码来源:TrackParams.cpp


示例20: TrackCustomColor

void TrackCustomColor(int iCustColor)
{
	COLORREF cr;
	UpdateCustomColors();
	cr = g_custColors[iCustColor] | 0x1000000;
	for (int i = 0; i <= GetNumTracks(); i++)
	{
		MediaTrack* tr = CSurf_TrackFromID(i, false);
		if (*(int*)GetSetMediaTrackInfo(tr, "I_SELECTED", NULL))
			GetSetMediaTrackInfo(tr, "I_CUSTOMCOLOR", &cr);
	}
	char cUndoText[100];
	sprintf(cUndoText, __LOCALIZE_VERFMT("Set track(s) to custom color %d","sws_undo"), iCustColor+1);
	Undo_OnStateChangeEx(cUndoText, UNDO_STATE_TRACKCFG, -1);
}
开发者ID:wolqws,项目名称:sws,代码行数:15,代码来源:Color.cpp



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ GetShape函数代码示例发布时间:2022-05-30
下一篇:
C++ GetSessionDbcLocale函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap