コード例 #1
0
void SC_LanguageClient::initRuntime(const Options& opt)
{
	// start virtual machine
	if (!mHiddenClient->mRunning) {
#ifdef __linux__
		using DirName = SC_Filesystem::DirName;
		namespace bfs = boost::filesystem;
		bfs::path deprecatedSupportDirectory = SC_Filesystem::instance().getDirectory(DirName::UserHome);
		deprecatedSupportDirectory /= "share/SuperCollider";

		if (bfs::exists(deprecatedSupportDirectory)) {
			bfs::path supportDirectory = SC_Filesystem::instance().getDirectory(DirName::UserAppSupport);
			postfl("WARNING: Deprecated support directory detected: %s\n"
				"Extensions and other contents in this directory will not be available until you move them to the new support directory:\n"
				"%s\n"
				"Quarks will need to be reinstalled due to broken symbolic links.\n\n",
				deprecatedSupportDirectory.string().c_str(), // we can safely convert to c_str here because the POSIX filesystem uses UTF-8
				supportDirectory.string().c_str());
		}
#endif

		mHiddenClient->mRunning = true;
		if (opt.mRuntimeDir) {
			int err = chdir(opt.mRuntimeDir);
			if (err)
				error("Cannot change to runtime directory: %s", strerror(errno));
		}
		pyr_init_mem_pools(opt.mMemSpace, opt.mMemGrow);
		init_OSC(opt.mPort);
		schedInit();
		onInitRuntime();
	}
}
コード例 #2
0
void SC_LanguageClient::initRuntime(const Options& opt)
{
	// start virtual machine
	if (!mHiddenClient->mRunning) {
#ifdef __linux__
		char deprecatedSupportDirectory[PATH_MAX];
		sc_GetUserHomeDirectory(deprecatedSupportDirectory, PATH_MAX);
		sc_AppendToPath(deprecatedSupportDirectory, PATH_MAX, "share/SuperCollider");

		if (sc_DirectoryExists(deprecatedSupportDirectory)) {
			char supportDirectory[PATH_MAX];
			sc_GetUserAppSupportDirectory(supportDirectory, PATH_MAX);
			postfl("WARNING: Deprecated support directory detected: %s\n"
				"Extensions and other contents in this directory will not be available until you move them to the new support directory:\n"
				"%s\n"
				"Quarks will need to be reinstalled due to broken symbolic links.\n\n", deprecatedSupportDirectory, supportDirectory);
		}
#endif

		mHiddenClient->mRunning = true;
		if (opt.mRuntimeDir) {
			int err = chdir(opt.mRuntimeDir);
			if (err)
				error("Cannot change to runtime directory: %s", strerror(errno));
		}
		pyr_init_mem_pools(opt.mMemSpace, opt.mMemGrow);
		init_OSC(opt.mPort);
		schedInit();
		onInitRuntime();
	}
}
コード例 #3
0
ファイル: init.c プロジェクト: Chrisini/hoveringsteward
/*---------------------------------------------------------------------------*/
void init(void) {
    init_PORT();
    init_TRIS();
    init_ANSEL();
    init_UART();
    init_SPI();
    init_TMR();
    init_OSC();
}
コード例 #4
0
ファイル: cmdLineFuncs.cpp プロジェクト: danstowell/SuperCute
int main()
{

	pyr_init_mem_pools(2*1024*1024, 256*1024);
	init_OSC(57120);
	schedInit();

	compileLibrary();
	runLibrary(s_run); fflush(postfile);

	return 0;
}
コード例 #5
0
ファイル: main.c プロジェクト: MECAHP/Projet-Industriel
/********************************************Programme Principal************************************************/
int main(void)
{
init_OSC();
init_dsPIC();
init_DAC();
init_ADC();
while(1)
	{
	val=convertADC()*64;
	}
return 0;
}
コード例 #6
0
void SC_LanguageClient::initRuntime(const Options& opt)
{
	// start virtual machine
	if (!mRunning) {
		mRunning = true;
		if (opt.mRuntimeDir) {
			int err = chdir(opt.mRuntimeDir);
			if (err)
				error("Cannot change to runtime directory: %s", strerror(errno));
		}
		pyr_init_mem_pools(opt.mMemSpace, opt.mMemGrow);
		init_OSC(opt.mPort);
		schedInit();
		onInitRuntime();
	}
}