Difference between revisions of "Fmod manager.h"

From Valve Developer Community
Jump to: navigation, search
m (link)
m (Removed manual 'last updated' time stamp at the top of the page)
 
Line 1: Line 1:
'''LAST EDITED:'''
 
--[[User:£cho|£cho]] 17:05, 22 November 2009 (UTC)
 
 
 
<pre>
 
<pre>
 
#ifndef FMOD_MANAGER_H
 
#ifndef FMOD_MANAGER_H

Latest revision as of 14:20, 16 December 2011

#ifndef FMOD_MANAGER_H
#define FMOD_MANAGER_H
#ifdef _WIN32
#pragma once
#endif

#include "fmod.hpp"

class CFMODManager
{
public:
	CFMODManager();
	~CFMODManager();
 
	void InitFMOD();
	void ExitFMOD();

	void FadeThink();

	bool IsSoundPlaying( const char* pathToFileFromSoundsFolder );

	void PlayAmbientSound( const char* pathToFileFromSoundsFolder, bool fadeIn );
	void StopAmbientSound( bool fadeOut );
	void TransitionAmbientSounds( const char* pathToFileFromSoundsFolder );

private:
	const char* GetFullPathToSound( const char* pathToFileFromModFolder );
	const char* GetCurrentSoundName( void );

	const char* currentSound;
	const char* newSoundFileToTransitionTo;
	bool m_bShouldTransition;
	bool m_bFadeIn;
	bool m_bFadeOut;
	float m_fFadeDelay;
};
 
extern CFMODManager* FMODManager();
 
#endif //FMOD_MANAGER_H

See also