Refactored audio sample playback

This commit is contained in:
Xawotihs@gmail.com
2012-02-11 18:20:08 +00:00
parent d7c69f3281
commit c38c52c6ad
9 changed files with 41 additions and 48 deletions

View File

@@ -73,7 +73,12 @@ public:
}
virtual bool IsThreaded() = 0;
void PlaySample(const string& fileName) {
JSample*sample = RetrieveSample(fileName);
if(sample) {
JSoundSystem::GetInstance()->PlaySample(sample);
}
};
virtual JQuadPtr RetrieveCard(MTGCard * card, int style = RETRIEVE_NORMAL,int submode = CACHE_NORMAL) = 0;
virtual JSample * RetrieveSample(const string& filename, int style = RETRIEVE_NORMAL, int submode = CACHE_NORMAL) = 0;
virtual JTexture * RetrieveTexture(const string& filename, int style = RETRIEVE_NORMAL, int submode = CACHE_NORMAL) = 0;