PyCriCodecsEx 0.0.4__cp312-cp312-win32.whl → 0.0.5__cp312-cp312-win32.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Binary file
PyCriCodecsEx/__init__.py CHANGED
@@ -1 +1 @@
1
- __version__ = "0.0.4"
1
+ __version__ = "0.0.5"
PyCriCodecsEx/acb.py CHANGED
@@ -188,10 +188,17 @@ class ACB(UTF):
188
188
  """Returns the AWB object associated with the ACB."""
189
189
  return AWB(self.view.AwbFile)
190
190
 
191
- def get_waveforms(self) -> List[HCACodec | ADXCodec | Tuple[AcbEncodeTypes, int, int, int, bytes]]:
191
+ def get_waveforms(self, **kwargs) -> List[HCACodec | ADXCodec | Tuple[AcbEncodeTypes, int, int, int, bytes]]:
192
192
  """Returns a list of decoded waveforms.
193
193
 
194
194
  Item may be a codec (if known), or a tuple of (Codec ID, Channel Count, Sample Count, Sample Rate, Raw data).
195
+
196
+ Additional keyword arguments are passed to the codec constructors. e.g. for encrypted HCA payloads,
197
+ you may do the following:
198
+ ```python
199
+ get_waveforms(key=..., subkey=...)
200
+ ```
201
+ See also the respective docs (ADXCodec, HCACodec) for more details.
195
202
  """
196
203
  CODEC_TABLE = {
197
204
  AcbEncodeTypes.ADX: ADXCodec,
@@ -204,7 +211,7 @@ class ACB(UTF):
204
211
  encode = AcbEncodeTypes(wav.EncodeType)
205
212
  codec = (CODEC_TABLE.get(encode, None))
206
213
  if codec:
207
- wavs.append(codec(awb.get_file_at(wav.MemoryAwbId)))
214
+ wavs.append(codec(awb.get_file_at(wav.MemoryAwbId), **kwargs))
208
215
  else:
209
216
  wavs.append((encode, wav.NumChannels, wav.NumSamples, wav.SamplingRate, awb.get_file_at(wav.MemoryAwbId)))
210
217
  return wavs
@@ -214,7 +221,7 @@ class ACB(UTF):
214
221
 
215
222
  Input item may be a codec (if known), or a tuple of (Codec ID, Channel Count, Sample Count, Sample Rate, Raw data).
216
223
 
217
- NOTE: Cue duration is not set. You need to change that manually.
224
+ NOTE: Cue duration is not set. You need to change that manually - this is usually unecessary as the player will just play until the end of the waveform.
218
225
  """
219
226
  WAVEFORM = self.view.WaveformTable[0]._payload.copy()
220
227
  encoded = []
PyCriCodecsEx/adx.py CHANGED
@@ -57,7 +57,7 @@ class ADXCodec(ADX):
57
57
 
58
58
  Args:
59
59
  stream (str | bytes): Path to the ADX or WAV file, or a BinaryIO stream. WAV files will be automatically encoded with the given settings first.
60
- filename (str, optional): Output filename. Defaults to "default.adx".
60
+ filename (str, optional): Filename, used by USMBuilder. Defaults to "default.adx".
61
61
  bitdepth (int, optional): Audio bit depth within [2,15]. Defaults to 4.
62
62
  """
63
63
  if type(stream) == str:
PyCriCodecsEx/hca.py CHANGED
@@ -332,7 +332,7 @@ class HCACodec(HCA):
332
332
 
333
333
  Args:
334
334
  stream (str | bytes): Path to the HCA or WAV file, or a BinaryIO stream. WAV files will be automatically encoded with the given settings first.
335
- filename (str, optional): USM filename. Defaults to "default.hca".
335
+ filename (str, optional): Filename, used by USMBuilder. Defaults to "default.hca".
336
336
  quality (CriHcaQuality, optional): Encoding quality. Defaults to CriHcaQuality.High.
337
337
  key (int, optional): HCA key. Defaults to 0.
338
338
  subkey (int, optional): HCA subkey. Defaults to 0.
PyCriCodecsEx/usm.py CHANGED
@@ -13,11 +13,7 @@ except ImportError:
13
13
  import tempfile
14
14
 
15
15
  # Big thanks and credit for k0lb3 and 9th helping me write this specific code.
16
- # Also credit for the original C++ code from Nyagamon/bnnm.
17
-
18
- # Apparently there is an older USM format called SofDec? This is for SofDec2 though.
19
- # Extraction working only for now, although check https://github.com/donmai-me/WannaCRI/
20
- # code for a complete breakdown of the USM format.
16
+ # Also credit for the original C++ code from Nyagamon/bnnm and https://github.com/donmai-me/WannaCRI/
21
17
 
22
18
  class USMCrypt:
23
19
  """USM related crypto functions"""
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: PyCriCodecsEx
3
- Version: 0.0.4
3
+ Version: 0.0.5
4
4
  Summary: Criware formats library for Python
5
5
  Home-page: https://mos9527.github.io/PyCriCodecsEx/
6
6
  Classifier: Programming Language :: Python :: 3
@@ -0,0 +1,15 @@
1
+ CriCodecsEx.cp312-win32.pyd,sha256=TmLC8PrEbJC24pGWvKOnq2CCFaFAiqGZTBo2Zwin5fk,68608
2
+ PyCriCodecsEx/__init__.py,sha256=vucW-Fe97d2P_nl7TMRJ2Cp458lb7VTRk6EckM_ozdM,23
3
+ PyCriCodecsEx/acb.py,sha256=_YpxIsdWW9vgz0KefKkb8zFnc2WKUwSTDqtgYaPDKp0,11956
4
+ PyCriCodecsEx/adx.py,sha256=LHr1YjVv6W0yzm1ZIGw54bM7rDW-Qozci0_GS8J4CrE,6130
5
+ PyCriCodecsEx/awb.py,sha256=SCTkKvn855bpr1I8Kq24P1es89I2unJaEGgDw7hg1Do,6395
6
+ PyCriCodecsEx/chunk.py,sha256=xmc92tONmXpdbOW2g-KckTeppTXFo8Km0J95UYbbvQg,2810
7
+ PyCriCodecsEx/cpk.py,sha256=er_eBLMG8eiXUvYp0h_lDWLN8Vx8CCDJ8COE9B5Rv_A,38125
8
+ PyCriCodecsEx/hca.py,sha256=TokIvd8IENZXxBw_3Na_o6vAoKvC8m_ooWIQ4qhmUqk,19603
9
+ PyCriCodecsEx/usm.py,sha256=Z6ETFy98Gl0KFot9zRE7Qg8_Dv9wsFUFybZgFvVXT_U,37173
10
+ PyCriCodecsEx/utf.py,sha256=0LBzpIbJiyL_4KOf_QpEJytr3PbHj8_M4Bd-Lay4wuk,28247
11
+ pycricodecsex-0.0.5.dist-info/licenses/LICENSE,sha256=B47Qr_82CmMyuL-wNFAH_P6PNJWaonv5dxo9MfgjEXw,1083
12
+ pycricodecsex-0.0.5.dist-info/METADATA,sha256=h3K2wCbl1h3WyL5-7AU6dFeW9hIxKcR3_FlFnf7KJWc,1291
13
+ pycricodecsex-0.0.5.dist-info/WHEEL,sha256=LwxTQZ0gyDP_uaeNCLm-ZIktY9hv6x0e22Q-hgFd-po,97
14
+ pycricodecsex-0.0.5.dist-info/top_level.txt,sha256=mSrrEse9hT0s6nl-sWAQWAhNRuZ6jo98pbFoN3L2MXk,26
15
+ pycricodecsex-0.0.5.dist-info/RECORD,,
@@ -1,15 +0,0 @@
1
- CriCodecsEx.cp312-win32.pyd,sha256=uE4Um0q6GskE_qqeVmr726oCNrpo5cSK_zyItAcgHmg,68096
2
- PyCriCodecsEx/__init__.py,sha256=b8Tfyn46wV92NWm_uziWVxCW3zTxPV8EyFKcI9HhXcA,23
3
- PyCriCodecsEx/acb.py,sha256=7eKR_pxn7gqhFONRUsdrIdHczxqJUnfRrVEe4vA6pFM,11549
4
- PyCriCodecsEx/adx.py,sha256=HvYyRTjOWXnV9kY0qzxTW3YRB-4m35czxDd-RjEhG1c,6117
5
- PyCriCodecsEx/awb.py,sha256=SCTkKvn855bpr1I8Kq24P1es89I2unJaEGgDw7hg1Do,6395
6
- PyCriCodecsEx/chunk.py,sha256=xmc92tONmXpdbOW2g-KckTeppTXFo8Km0J95UYbbvQg,2810
7
- PyCriCodecsEx/cpk.py,sha256=er_eBLMG8eiXUvYp0h_lDWLN8Vx8CCDJ8COE9B5Rv_A,38125
8
- PyCriCodecsEx/hca.py,sha256=9GgAOS-mkd4pdXAF5YX0hzKt7nI7_LE5dZT5I--5Tbo,19587
9
- PyCriCodecsEx/usm.py,sha256=MQg229op95pGw46bvdXjwDBOdwZqlEXOc2SWGggLivU,37361
10
- PyCriCodecsEx/utf.py,sha256=0LBzpIbJiyL_4KOf_QpEJytr3PbHj8_M4Bd-Lay4wuk,28247
11
- pycricodecsex-0.0.4.dist-info/licenses/LICENSE,sha256=B47Qr_82CmMyuL-wNFAH_P6PNJWaonv5dxo9MfgjEXw,1083
12
- pycricodecsex-0.0.4.dist-info/METADATA,sha256=gGvEr_w5BQsqBT68VHnsnqoz2sPkCPqU1IqQy4Xk92E,1291
13
- pycricodecsex-0.0.4.dist-info/WHEEL,sha256=LwxTQZ0gyDP_uaeNCLm-ZIktY9hv6x0e22Q-hgFd-po,97
14
- pycricodecsex-0.0.4.dist-info/top_level.txt,sha256=mSrrEse9hT0s6nl-sWAQWAhNRuZ6jo98pbFoN3L2MXk,26
15
- pycricodecsex-0.0.4.dist-info/RECORD,,