[spec][_xsnd] Risen Sound Resource file format 7823 0

O temacie

Autor Adanos

Zaczęty 31.10.2009 roku

Wyświetleń 7823

Odpowiedzi 0

Adanos

Adanos

Administrator
Szara eminencja
posty5204
Propsy3870
ProfesjaProgramista
  • Administrator
  • Szara eminencja
Plik risensnd.txt:
////////////////////////////////////////////////////////////////////////////////
//
//  Risen Sound Resource file format specs.
//  Copyright (c) 2009 Nico Bendlin <nicode@gmx.net>
//
//  +-----------------+
//  | resource header |
//  +-----------------+
//  |  property data  |
//  +-----------------+
//  |  resource data  |
//  +-----------------+
//
//  Duration (long)
// Complete playtime of the resource data in milliseconds.
//
//  Flags (char)
// Flags & 0x01 = Is2D, Flags & 0x02 = IsSoftware. If the
// filename contains "%_sw" IsSoftware flag is set and if
// the name contains "%_2d" Is2D + IsSoftware are present.
//
//  Links (bTObjArray<struct eCSoundResource2::SLink>)
// A bTObjArray starts with uint8_t Version (01) followed
// by an uint32_t Count. An eCSoundResource2::SLink entry
// has a bCString Name and uint32_t Offset (milliseconds).
//
////////////////////////////////////////////////////////////////////////////////

struct Head {
  char8_t  ResMagic[4]; // "GR01"
  char8_t  ResClass[4]; // "SN04"
  uint32_t PropOffset;
  uint32_t PropLength;
  uint32_t DataOffset;
  uint32_t DataLength;
  uint64_t RawTimestamp;   // (FILETIME)
  char8_t  RawFileExt[8];  // ".wav"
}
// @Head.PropOffset
class Prop {
  class PropertyObject {
uint8_t  Header[6]; // 01,00,01,01,00,01
bCString ClassName; // 0010,"eCSoundResource2"
uint8_t  unknown[3]; // 01,00,00
uint16_t ClassVersion;  // 00C9
uint16_t Version;   // 00C9
uint32_t DataSize;
class PropertyData {
 uint16_t Version;  // 00C9
 uint32_t Count;
 for( Count ) {
bCString Name;
bCString Type;
uint16_t Version;  // 001E
uint32_t Size;
uint8_t  Data[Size];
 }
}
struct ClassData {
 uint16_t ClassVersion;  // 00C9
}
  }
}
// @Head.DataOffset
class Data {
  uint8_t Frames[Head.DataLength];  // MPEG Audio frames
}

Ta specyfikacja jest wystarczająco kompletna, aby można było utworzyć pliki dźwiękowe do Risen.

Cytat: NicoDE\'
My Risen _XSND to MP3 converter has been enhanced to export the Links (SyncPoints) into a *.txt file that can be imported in Audacityimported in Audacity.


0 użytkowników i 1 Gość przegląda ten wątek.
0 użytkowników
Do góry