示例#1
0
recording_t::recording_t(const char *filename)
{
	int fd = open(filename, O_RDONLY);
	if (fd < 0) {
		perror("recording_t: open:");
		return;
	}
	load_from(fd);
	close(fd);
}
示例#2
0
void Instrument::load_from( const QString& drumkit_name, const QString& instrument_name, bool is_live )
{
	QString dir = Filesystem::drumkit_path_search( drumkit_name );
	if ( dir.isEmpty() ) return;
	Drumkit* drumkit = Drumkit::load( dir );
	assert( drumkit );
	Instrument* instrument = drumkit->get_instruments()->find( instrument_name );
	if ( instrument!=0 ) {
		load_from( drumkit, instrument, is_live );
	}
	delete drumkit;
}
示例#3
0
void Instrument::load_from( const QString& dk_name, const QString& instrument_name, bool is_live )
{
	Drumkit* drumkit = Drumkit::load_by_name( dk_name );
	if ( ! drumkit ){
		return;
	}

	assert( drumkit );

	Instrument* instrument = drumkit->get_instruments()->find( instrument_name );
	if ( instrument!=0 ) {
		load_from( drumkit, instrument, is_live );
	}
	delete drumkit;
}
示例#4
0
void config_dialog::OnButLoad() 
{
	// TODO: この位置にコントロール通知ハンドラ用のコードを追加してください
	static char filter[] = "equalizer file (*.eq)\0*.eq\0All files (*.*)\0*.*\0\0";
	CFileDialog *filedialog;
	char filename[257];

	filedialog = new CFileDialog(TRUE,".eq");

	filedialog->m_ofn.lpstrFilter = filter;
	filedialog->m_ofn.lpstrFile = filename;
	filename[0] = '\0';
	filedialog->m_ofn.nMaxFile = 256;

	if (filedialog->DoModal() == IDCANCEL) {
		delete filedialog;
		return;
	}

	delete filedialog;

	//

	load_from(filename,0);

	for(int i=0;i<19;i++)
	{
		lsl[i]->SetPos(lslpos[i]);
		rsl[i]->SetPos(rslpos[i]);
	}

    m_list_param.ResetContent();

	for(paramlistelm *e = paramroot.elm;e != NULL;e = e->next)
	{
		int indx = m_list_param.AddString(e->getString());
		m_list_param.SetItemDataPtr(indx,e);
	}

	setBandsFromSlpos();

	not_applied = 0;
	m_but_apply.EnableWindow(FALSE);
}
示例#5
0
    static cic::config load(const boost::filesystem::path configuration_path) {
      ifstream input(configuration_path.c_str());

      return load_from(input);
    }
示例#6
0
    static cic::config from_string(const string config_text) {
      stringstream ss(config_text);

      return load_from(ss);
    }
示例#7
0
recording_t::recording_t(int fd)
{
	load_from(fd);
}