コード例 #1
0
 public static void Convert2Wem(string sourcePath, string destinationPath, int audioQuality)
 {
     try
     {
         LoadWwiseTemplate(sourcePath, audioQuality);
         ExternalApps.Wav2Wem(GetWwisePath());
         GetWwiseFiles(destinationPath);
     }
     catch (Exception ex)
     {
         //overrided ex, can't get real ex/msg, use log + throw;
         throw new Exception("Wwise audio file conversion failed: " + ex.Message);
     }
 }
コード例 #2
0
        /// <summary>
        /// Covert Wav to Wem using WwiseCLI.exe
        /// for faster conversion, source path should be wav file
        /// </summary>
        /// <param name="wavSourcePath"></param>
        /// <param name="destinationPath"></param>
        /// <param name="audioQuality"></param>
        public static void Convert2Wem(string wavSourcePath, string destinationPath, int audioQuality)
        {
            try
            {
                var wwiseCLIPath     = GetWwisePath();
                var wwiseTemplateDir = LoadWwiseTemplate(wavSourcePath, audioQuality, wwiseCLIPath);

                // used to debug library paths
                // MessageBox.Show("wwiseCLIPath:" + wwiseCLIPath + Environment.NewLine + "wwiseTemplateDir: " + wwiseTemplateDir);

                ExternalApps.Wav2Wem(wwiseCLIPath, wwiseTemplateDir);
                GetWwiseFiles(destinationPath, wwiseTemplateDir);
            }
            catch (Exception ex)
            {
                //overridden ex, can't get real ex/msg, use log + throw;
                throw new Exception("Wwise audio file conversion failed: " + ex.Message);
            }
        }
コード例 #3
0
        /// <summary>
        /// Covert Wav to Wem using WwiseCLI.exe
        /// for faster conversion, source path should be wav file
        /// </summary>
        /// <param name="wavSourcePath"></param>
        /// <param name="destinationPath"></param>
        /// <param name="audioQuality"></param>
        public static void Wav2Wem(string wavSourcePath, string destinationPath, int audioQuality)
        {
            try
            {
                var wwiseCLIPath     = GetWwisePath();
                var wwiseTemplateDir = LoadWwiseTemplate(wavSourcePath, audioQuality);

                // console writes may be captured by starting toolkit in a command window an redirecting the output to a file
                // e.g., ‘RocksmithToolkitGUI.exe >console.log’
                Console.WriteLine("WwiseCLI:\n\'" + wwiseCLIPath + "\'\n\nTemplate:\n\'" + wwiseTemplateDir + "\'");

                ExternalApps.Wav2Wem(wwiseCLIPath, wwiseTemplateDir);
                GetWwiseFiles(destinationPath, wwiseTemplateDir);
            }
            catch (Exception ex)
            {
                //overridden ex, can't get real ex/msg, use log + throw;
                throw new Exception("Wwise audio file conversion failed: " + ex.Message);
            }
        }