void plAutoProfileImp::INextProfile() { // Haven't linked to our first age yet, do that before we start profiling if (fNextAge == 0) { if (!INextAge()) IShutdown(); } else { // Log the stats for this spawn point if (!fLastSpawnPointName.IsNull()) { plString ageName = NetCommGetAge()->ageDatasetName; plProfileManagerFull::Instance().LogStats(ageName, fLastSpawnPointName); plMipmap mipmap; if (plClient::GetInstance()->GetPipeline()->CaptureScreen(&mipmap)) { plString fileName = plFormat("{}\\{}_{}.jpg", plProfileManagerFull::Instance().GetProfilePath(), ageName, fLastSpawnPointName); plJPEG::Instance().SetWriteQuality(100); plJPEG::Instance().WriteToFile(fileName.c_str(), &mipmap); } fLastSpawnPointName = plString::Null; } // Try to go to the next spawn point if (!INextSpawnPoint()) { // Link to the next age if (!INextAge()) { // We've done all the ages, shut down IShutdown(); } } } }
/*---------------------------------------------------------------------------* * Routine: Network_lwIP_Close *---------------------------------------------------------------------------* * Description: * Close out a network that was previously opened. * Inputs: * void *aWorkspace -- Workspace * Outputs: * T_uezError -- Error code *---------------------------------------------------------------------------*/ T_uezError Network_lwIP_Close(void *aWorkspace) { T_Network_lwIP_Workspace *p = (T_Network_lwIP_Workspace *)aWorkspace; T_uezError error = UEZ_ERROR_NONE; UEZSemaphoreGrab(p->iSem, UEZ_TIMEOUT_INFINITE); if (p->iNumOpen == 0) { error = UEZ_ERROR_NOT_OPEN; } else { if (p->iNumOpen == 1) { // Last user done! Let's close out and turn off the library error = IShutdown(p); if (error == UEZ_ERROR_NONE) p->iNumOpen--; } } UEZSemaphoreRelease(p->iSem); return error; }
plWinMicLevel::plWinMicLevel() { #if HS_BUILD_FOR_WIN32 sMixerHandle = nil; memset( &sMixerCaps, 0, sizeof( sMixerCaps ) ); // Get the number of mixers in the system sNumMixers = ::mixerGetNumDevs(); // So long as we have one, open the first one if( sNumMixers == 0 ) return; if( ::mixerOpen( &sMixerHandle, 0, nil, // Window handle to receive callback messages nil, MIXER_OBJECTF_MIXER ) != MMSYSERR_NOERROR ) { sMixerHandle = nil; // Just to be sure return; } if( ::mixerGetDevCaps( (UINT)sMixerHandle, &sMixerCaps, sizeof( sMixerCaps ) ) != MMSYSERR_NOERROR ) { // Oh well, who cares } // Try to get the Mux/mixer-based mic volume control first, since that seems to work better/more often/at all if( !IGetMuxMicVolumeControl() ) { // Failed, so try getting the volume control from the base mic-in line if( !IGetBaseMicVolumeControl() ) { IShutdown(); return; } } #endif }
plWinMicLevel::~plWinMicLevel() { IShutdown(); }