3 * \file build_samplebank.cpp
4 * \brief Build Samplebank
5 * \date 2010-03-06 21:36GMT
6 * \author Jan Boon (Kaetemi)
9 // NeL - MMORPG Framework <http://dev.ryzom.com/projects/nel/>
10 // Copyright (C) 2010 Jan BOON (Kaetemi) <jan.boon@kaetemi.be>
12 // This program is free software: you can redistribute it and/or modify
13 // it under the terms of the GNU Affero General Public License as
14 // published by the Free Software Foundation, either version 3 of the
15 // License, or (at your option) any later version.
17 // This program is distributed in the hope that it will be useful,
18 // but WITHOUT ANY WARRANTY; without even the implied warranty of
19 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 // GNU Affero General Public License for more details.
22 // You should have received a copy of the GNU Affero General Public License
23 // along with this program. If not, see <http://www.gnu.org/licenses/>.
25 #include <nel/misc/types_nl.h>
35 #include <nel/misc/common.h>
36 #include <nel/misc/file.h>
37 #include <nel/misc/log.h>
38 #include <nel/misc/path.h>
39 #include <nel/sound/u_audio_mixer.h>
45 using namespace NLMISC
;
46 using namespace NLSOUND
;
50 } /* anonymous namespace */
52 int main(int nNbArg
, char **ppArgs
)
60 nlinfo("ERROR : Wrong number of arguments\n");
61 nlinfo("USAGE : build_samplebank <source_samplebank> <build_samplebank> <samplebank_name>\n");
64 string samplebanksDir
= string(ppArgs
[1]);
65 if (!CFile::isDirectory(samplebanksDir
))
67 nlerrornoex("Directory source_samplebank '%s' does not exist", samplebanksDir
.c_str());
70 string buildSampleBanksDir
= string(ppArgs
[2]);
71 if (!CFile::isDirectory(buildSampleBanksDir
))
73 nlerrornoex("Directory build_samplebank '%s' does not exist", buildSampleBanksDir
.c_str());
76 string sampleBankName
= string(ppArgs
[3]);
78 // build the sample bank
79 UAudioMixer::buildSampleBank(samplebanksDir
, buildSampleBanksDir
, sampleBankName
);
81 // and that's all folks