Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

wem unknown fields #15

Open
sandiz opened this issue Dec 27, 2019 · 1 comment
Open

wem unknown fields #15

sandiz opened this issue Dec 27, 2019 · 1 comment

Comments

@sandiz
Copy link

sandiz commented Dec 27, 2019

hi @hcs64 , thanks for the great work on ww2ogg! i have been using the source to write an ogg2wem for my project. using your code as a starting point, i have this structure for the wem files so far.

/tmp/test_m/audio/mac/180976557.wem
{ magic: 'RIFF', fileSize: 3648375, riffType: 'WAVE' }
{ fmtMagic: 'fmt ',
  fmtSize: 66,
  formatTag: -1,
  channels: 2,
  sampleRate: 48000,
  avgBPS: 15820,
  sampleFrameSize: 0,
  bitsPerSample: 0,
  fmtSizeMinus0x12: 48,
  fieldAlways0: 0,
  subtype: 3,
  sampleCount: 11060740,
  modSignal: 217,
  unk2: [ 3645617, 3932160 ],  /* unknown */
  setup_packet_offset: 2672,
  first_audio_packet_offset: 2889,
  unk3: [ 445, 60, 16080 ],  /* unknown -  (16080 doesnt change across wem's) */
  uid: 1085276160,
  bs_0: 0,
  bs_1: 0,
  bs_2: 0,
  bs_3: 0,
  unk4: [ 185134185 ], /* unknown */
}
{
  dataMagic: 'data',
  dataSize: 3648289,
  unk5: /*unknown */
   <Buffer 40 42 0c 01 00 40 30 00 00 40 30 00 00 40 30 00 00 40 30 00 
00 40 30 00 00 40 30 00 00 40 30 00 00 40 30 00 00 40 30 00 00 40 30 
00 00 40 30 00 00 40 ... 2622 more bytes>,
  setup_packet_size: 215,
  setup_package_data:
   <Buffer 29 26 9c 80 42 0a 2a ac c0 42 0b 2e bc 00 43 0c 3e fc 00 44 10 
42 0c 41 44 11 46 1c 81 44 12 4a 2c c1 84 6b a1 89 36 1a 69 a5 99 76 1a 6a 
a9 a9 b6 1a ... 165 more bytes>,
  packets:
   [ { packet_size: 1, first: { mode_number: 0, remainder: 0 }, rest: <Buffer > },
     { packet_size: 1, first: { mode_number: 0, remainder: 64 }, rest: <Buffer > },
     { packet_size: 1, first: { mode_number: 0, remainder: 64 }, rest: <Buffer > },
     { packet_size: 1, first: { mode_number: 0, remainder: 64 }, rest: <Buffer > },
     { packet_size: 1, first: { mode_number: 0, remainder: 64 }, rest: <Buffer > },
     { packet_size: 1, first: { mode_number: 0, remainder: 64 }, rest: <Buffer > },
     { packet_size: 1, first: { mode_number: 0, remainder: 64 }, rest: <Buffer > },
     { packet_size: 1, first: { mode_number: 0, remainder: 64 }, rest: <Buffer > },
     { packet_size: 1, first: { mode_number: 0, remainder: 64 }, rest: <Buffer > },
     { packet_size: 1, first: { mode_number: 0, remainder: 64 }, rest: <Buffer > },
     ... 13124 more items ] }
}

most of the field data is available to me expect for the 4 unk* fields, any idea what the unk fields could be ? They seem to be mandatory, as zero'ing causes the wem to not play.

I know the file format is proprietary but any help would be much appreciated! 😇

@hcs64
Copy link
Owner

hcs64 commented Jan 29, 2020

It's a good question but I have no idea! I'll leave this open in case someone else can provide info.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants