DWORD WINAPI startOddcast(LPVOID lpParameter) 
{

	
	initializeencoder();
	if (connectToServer()) {
		setCurrentSongTitle("");
		UpdateWhatsPlaying();
	}
	else {
		MessageBox(NULL, "Unable to Connect", NULL, MB_OK);
		return(0);
	}
	if (getLiveRecordingSetFlag()) {
		if (!initLiveRecording()) {
			MessageBox(NULL, "Fail to open input device", NULL, MB_OK);
			disconnectFromServer();
			return 0;
		}
		else {
			char	buf[255] = "";
			sprintf(buf, "%dHz/Stereo PCM", getLiveInSamplerate());
			setSourceDescription(buf);
			int songChange = setCurrentSongTitle(getServerDesc());
			startRecording();
		}
	}
	return 1;
}
void outputServerTypeCallback(void *pValue) {
	// pValue is a string
//	pApp->setOutputServerType((char *)pValue);
	char	buf[2046] = "";
	sprintf(buf, "%s Server : %s", (char *)pValue, getServerDesc());
	if (pOddcast) {
		pOddcast->m_ServerDescValue->setName((char *)buf);
	}
}
Esempio n. 3
0
/** Sets the loaded values to the given server configuration
  *
  * The given ServerConfiguration pointer \b must be valid.
  *
  * \param sc The ServerConfiguration structure pointer
  *
  * \return \c true if the operation successed
  *
  */
bool RainbruRPG::Server::xmlServerConf::load(ServerConfiguration* sc){
  LOGI("Getting saved server configuration :");

  LOGCATS("  name : '");
  LOGCATS( getServerName() );
  LOGCATS("'");
  LOGCAT();

  LOGCATS("  desc : '");
  LOGCATS( getServerDesc() );
  LOGCATS("'");
  LOGCAT();

  LOGCATS("  technote : '");
  LOGCATS( getTechNote() );
  LOGCATS("'");
  LOGCAT();

  LOGCATS("  Playmode : '");
  LOGCATB( getPlayMode() );
  LOGCATS("'");
  LOGCAT();

  LOGCATS("  Editmode : '");
  LOGCATB( getEditMode() );
  LOGCATS("'");
  LOGCAT();

  LOGCATS("  Floodmode : '");
  LOGCATB( getFloodMode() );
  LOGCATS("'");
  LOGCAT();

  LOGCATS("  Port : '");
  LOGCATI( getPort() );
  LOGCATS("'");
  LOGCAT();

  LOGCATS("  MaxClient : '");
  LOGCATI( getMaxClient() );
  LOGCATS("'");
  LOGCAT();

  LOGCATS("  Type : '");
  LOGCATI( getType());
  LOGCATS("'");
  LOGCAT();

  // Database debug
  LOGCATS("  dbHostName : '");
  LOGCATS( getDbHostName().c_str() );
  LOGCATS("'");
  LOGCAT();

  LOGCATS("  DbName : '");
  LOGCATS( getDbName().c_str() );
  LOGCATS("'");
  LOGCAT();

  LOGCATS(" DbUserName  : '******'");
  LOGCAT();

  LOGCATS(" DbUserPwd  : '");
  LOGCATS( getDbUserPwd().c_str() );
  LOGCATS("'");
  LOGCAT();

  sc->setName(getServerName());
  sc->setDesc(getServerDesc());
  sc->setType(getType());
  sc->setTechNote(getTechNote());
  sc->setPlayMode(getPlayMode());
  sc->setEditMode(getEditMode());
  sc->setFloodMode(getFloodMode());
  sc->setPort(getPort());
  sc->setFtpPort(getFtpPort());
  sc->setMaxClient(getMaxClient());
  sc->setIpAdress(getIpAdress());
  //database values
  sc->setHostName(getDbHostName().c_str());
  sc->setDatabaseName(getDbName().c_str());
  sc->setUserName(getDbUserName().c_str());
  sc->setPassword(getDbUserPwd().c_str());
}