* Add a method to abstract the file size.
This commit is contained in:
jean.chalard
2010-02-02 09:11:44 +00:00
parent 02e3932017
commit 4f0a264146
3 changed files with 14 additions and 0 deletions

View File

@@ -74,6 +74,7 @@ class JSample
int mVoice;
unsigned long fileSize();
#if defined (WIN32) || defined (LINUX)
#ifdef WITH_FMOD
FSOUND_SAMPLE *mSample;

View File

@@ -48,6 +48,11 @@ JSample::~JSample()
releaseWaveData(mSample);
}
unsigned long JSample;:fileSize()
{
return mSample->fileSize;
}
JSoundSystem* JSoundSystem::mInstance = NULL;
JSoundSystem* JSoundSystem::GetInstance()

View File

@@ -58,6 +58,14 @@ JSample::~JSample()
#endif
}
unsigned long JSample::fileSize()
{
#ifdef WITH_FMOD
return FSOUND_Sample_GetLength(mSample);
#else
return 0;
#endif
}
//////////////////////////////////////////////////////////////////////////
JSoundSystem* JSoundSystem::mInstance = NULL;