Forgot to upload /another/ file.

This commit is contained in:
Joshua Jones 2010-02-14 05:44:36 +00:00
parent c5b1505822
commit b44bf8a1b2
1 changed files with 59 additions and 0 deletions

View File

@ -0,0 +1,59 @@
#ifndef CMP3DECODERPLUGIN_H
#define CMP3DECODERPLUGIN_H
#include "IAudioPlugin.h"
#include "cMP3DecoderFactory.h"
using namespace cAudio;
class cMP3DecoderPlugin : public IAudioPlugin
{
bool installPlugin(ILogger* logger)
{
//This plugin has no first time initialization to do, so this is an easy function
return true;
}
const char* getPluginName()
{
return "MP3Decoder";
}
void uninstallPlugin()
{
//Nothing to clean up
}
void onCreateAudioManager(IAudioManager* manager)
{
cMP3DecoderFactory* factory = new cMP3DecoderFactory();
if(factory)
{
manager->registerAudioDecoder(factory, "mp3");
}
}
void onCreateAudioCapture(IAudioCapture* capture)
{
//Do nothing with this "event"
}
void onDestroyAudioManager(IAudioManager* manager)
{
cAudio::IAudioDecoderFactory* factory = manager->getAudioDecoderFactory("mp3");
manager->unRegisterAudioDecoder("mp3");
if(factory)
{
delete factory;
}
}
void onDestoryAudioCapture(IAudioCapture* capture)
{
//Do nothing with this "event"
}
};
#endif //! CMP3DECODERPLUGIN_H