Advertisement
Guest User

Untitled

a guest
Jul 22nd, 2017
52
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 1.22 KB | None | 0 0
  1. ////////////////////////////////////////////////
  2. //unpack_samplebank
  3. //  unpacks the samples from .sample_bank files
  4. //
  5. //
  6. ////////////////////////////////////////////////
  7.  
  8. #include <nel/misc/types_nl.h>
  9.  
  10. // STL includes
  11. #include <vector>
  12. #include <string>
  13. #include <map>
  14. #include <iostream>
  15. #include <fstream>
  16.  
  17. // NeL includes
  18. #include <nel/misc/common.h>
  19. #include <nel/misc/file.h>
  20. #include <nel/misc/log.h>
  21. #include <nel/misc/path.h>
  22. #include <nel/sound/u_audio_mixer.h>
  23. #include <nel/sound/sample_bank.h>
  24. #include <nel/sound/sample_bank_manager.h>
  25.  
  26. // Project includes
  27. // ...
  28.  
  29. using namespace std;
  30. using namespace NLMISC;
  31. using namespace NLSOUND;
  32.  
  33. int main( int argc, char **argv ){
  34.     std::cout << "sample_bank unpacker tool" << std::endl;
  35.     std::cout << "Copyright (C) 2011 iEzri Entertainment Inc." << std::endl << std::endl;
  36.  
  37.     if( argc != 2 ){
  38.         std::cout << "usage: " << argv[ 0 ] << " < sample_bank file >" << std::endl;
  39.         return 0;
  40.     }
  41.  
  42.     std::string filename( argv[ 1 ] );
  43.    
  44.     if( filename.find( ".sample_bank" ) == std::string::npos ){
  45.         std::cout << "usage: " << argv[ 0 ] << " < sample_bank file >" << std::endl;
  46.         return 0;
  47.     }
  48.    
  49.     UAudioMixer::UnpackSampleBank( filename );
  50.  
  51.     return 0;
  52.  
  53. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement