mirror of
https://github.com/blueskythlikesclouds/SonicAudioTools.git
synced 2025-02-10 16:02:58 +01:00
46 lines
1.2 KiB
Plaintext
46 lines
1.2 KiB
Plaintext
|
using System;
|
||
|
using System.Collections.Generic;
|
||
|
using System.Linq;
|
||
|
using System.Text;
|
||
|
using System.IO;
|
||
|
using System.IO.Compression;
|
||
|
using System.ComponentModel;
|
||
|
using System.Collections;
|
||
|
|
||
|
using SonicAudioLib;
|
||
|
using SonicAudioLib.Archive;
|
||
|
using SonicAudioLib.Collections;
|
||
|
using SonicAudioLib.IO;
|
||
|
using SonicAudioLib.CriMw;
|
||
|
|
||
|
using System.Xml;
|
||
|
using System.Xml.Serialization;
|
||
|
|
||
|
namespace SonicAudioCmd
|
||
|
{
|
||
|
class Program
|
||
|
{
|
||
|
static void Main(string[] args)
|
||
|
{
|
||
|
CriTable table = new CriTable();
|
||
|
table.Load(args[0]);
|
||
|
|
||
|
CriRow soundElementTableRow = table.Rows.Single(row => (string)row["name"] == "SOUND_ELEMENT");
|
||
|
|
||
|
CriTable sdlTable = new CriTable();
|
||
|
sdlTable.Load(soundElementTableRow["utf"] as byte[]);
|
||
|
|
||
|
foreach (CriRow criRow in sdlTable.Rows)
|
||
|
{
|
||
|
criRow["sfreq"] = (uint)criRow["sfreq"] / 2;
|
||
|
}
|
||
|
|
||
|
sdlTable.WriterSettings = CriTableWriterSettings.AdxSettings;
|
||
|
soundElementTableRow["utf"] = sdlTable.Save();
|
||
|
|
||
|
table.WriterSettings = CriTableWriterSettings.AdxSettings;
|
||
|
table.Save(args[0]);
|
||
|
}
|
||
|
}
|
||
|
}
|