Hi Member 4671287,
Try this :
private object ADDAUDIOFILE(ref ArrayList F, string Destination, ref long Duration = 0)
{
NCTAUDIOFILELib.AudioFileClass DEST = new NCTAUDIOFILELib.AudioFileClass();
NCTAUDIOFILELib.AudioFileClass File1 = new NCTAUDIOFILELib.AudioFileClass();
long BufferSize = 0;
Array Wave1 = null;
int I = 0;
bool Flg = false;
if (File.Exists(Destination) == true) {
try {
File.Delete(Destination);
} catch (Exception ex) {
System.Threading.Thread.CurrentThread.Sleep(200);
File.Delete(Destination);
}
}
BufferSize = 50000;
File1.OpenFile(F[0]);
DEST.SetFormatPCM(File1.ArrayFrequency, File1.ArrayChannels, NCTAUDIOFILELib.BitsPerSampleConstants.BPS_8_BIT);
DEST.CreateFile(Destination);
Flg = true;
for (I = 0; I <= F.Count - 1; I++) {
File1.OpenFile(F[I]);
while ((Flg)) {
Wave1 = File1.ReadFile(BufferSize);
if (Information.UBound(Wave1) < 1) {
Flg = false;
} else {
DEST.WriteFile(Wave1);
}
}
Flg = true;
File1.CloseFile();
}
Duration = DEST.Duration();
DEST.CloseFile();
}
for any other conversions use this
converter[
^]
I hope this help,
:)