J :
* Add a method to abstract the file size.
This commit is contained in:
@@ -74,6 +74,7 @@ class JSample
|
||||
|
||||
int mVoice;
|
||||
|
||||
unsigned long fileSize();
|
||||
#if defined (WIN32) || defined (LINUX)
|
||||
#ifdef WITH_FMOD
|
||||
FSOUND_SAMPLE *mSample;
|
||||
|
||||
@@ -48,6 +48,11 @@ JSample::~JSample()
|
||||
releaseWaveData(mSample);
|
||||
}
|
||||
|
||||
unsigned long JSample;:fileSize()
|
||||
{
|
||||
return mSample->fileSize;
|
||||
}
|
||||
|
||||
JSoundSystem* JSoundSystem::mInstance = NULL;
|
||||
|
||||
JSoundSystem* JSoundSystem::GetInstance()
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user