NSVFactory.cpp 485 B

1234567891011121314151617181920212223242526
  1. #include "NSVFactory.h"
  2. #include "nsvmain.h"
  3. #include "api__mp3-mpg123.h"
  4. #include "../nsv/nsvlib.h"
  5. IAudioDecoder *NSVFactory::CreateAudioDecoder(FOURCC format, IAudioOutput **output)
  6. {
  7. switch (format)
  8. {
  9. case NSV_MAKETYPE('M', 'P', '3', ' '):
  10. {
  11. MP3_Decoder *dec;
  12. WASABI_API_MEMMGR->New(&dec);
  13. return dec;
  14. }
  15. default:
  16. return 0;
  17. }
  18. }
  19. #define CBCLASS NSVFactory
  20. START_DISPATCH;
  21. CB(SVC_NSVFACTORY_CREATEAUDIODECODER, CreateAudioDecoder)
  22. END_DISPATCH;
  23. #undef CBCLASS