PyCriCodecsEx 0.0.4__cp312-cp312-macosx_11_0_arm64.whl → 0.0.5__cp312-cp312-macosx_11_0_arm64.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.
- CriCodecsEx.cpython-312-darwin.so +0 -0
- PyCriCodecsEx/__init__.py +1 -1
- PyCriCodecsEx/acb.py +10 -3
- PyCriCodecsEx/adx.py +1 -1
- PyCriCodecsEx/hca.py +1 -1
- PyCriCodecsEx/usm.py +1 -5
- {pycricodecsex-0.0.4.dist-info → pycricodecsex-0.0.5.dist-info}/METADATA +1 -1
- pycricodecsex-0.0.5.dist-info/RECORD +15 -0
- pycricodecsex-0.0.4.dist-info/RECORD +0 -15
- {pycricodecsex-0.0.4.dist-info → pycricodecsex-0.0.5.dist-info}/WHEEL +0 -0
- {pycricodecsex-0.0.4.dist-info → pycricodecsex-0.0.5.dist-info}/licenses/LICENSE +0 -0
- {pycricodecsex-0.0.4.dist-info → pycricodecsex-0.0.5.dist-info}/top_level.txt +0 -0
|
Binary file
|
PyCriCodecsEx/__init__.py
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
__version__ = "0.0.
|
|
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):
|
|
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):
|
|
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"""
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
CriCodecsEx.cpython-312-darwin.so,sha256=Vp_vL3BpFPOneK6ZI5MJyI1q0-ngYivKzEC2WEtNjmk,134944
|
|
2
|
+
pycricodecsex-0.0.5.dist-info/RECORD,,
|
|
3
|
+
pycricodecsex-0.0.5.dist-info/WHEEL,sha256=CltXN3lQvXbHxKDtiDwW0RNzF8s2WyBuPbOAX_ZeQlA,109
|
|
4
|
+
pycricodecsex-0.0.5.dist-info/top_level.txt,sha256=mSrrEse9hT0s6nl-sWAQWAhNRuZ6jo98pbFoN3L2MXk,26
|
|
5
|
+
pycricodecsex-0.0.5.dist-info/METADATA,sha256=DU7M5Yv8bs7WE_UafvxP6omoUqJ6E0Xi1jC-a3O_RoQ,1256
|
|
6
|
+
pycricodecsex-0.0.5.dist-info/licenses/LICENSE,sha256=GyZb4dzF2tM3LU5I_tJXpHtUDz8297zeUuCJ5qz8io0,1063
|
|
7
|
+
PyCriCodecsEx/adx.py,sha256=RFW9NmayPLMcLZXmKVQvaQqt9lj8wS89N8n-nbB137c,5972
|
|
8
|
+
PyCriCodecsEx/__init__.py,sha256=S7u1lbuWmM3A3ajykBialmPoJUK6Jg-WmNqM-9OZFdk,22
|
|
9
|
+
PyCriCodecsEx/chunk.py,sha256=ZYyeqqcBK6dDDj12YvrhpZDzW0iyOhysRlYuCD3rgQ8,2719
|
|
10
|
+
PyCriCodecsEx/hca.py,sha256=O88_qqtXLhekbg_UjqLKYYdBIeddrzZ3Iyyq6xvX2mY,19149
|
|
11
|
+
PyCriCodecsEx/cpk.py,sha256=cBZDLowGG7GCSJ8caPbj26t0inYGZ92Iwz_hL0hgOmU,37383
|
|
12
|
+
PyCriCodecsEx/usm.py,sha256=87p6NMnJQlJ9s5PS3QyHoSANuHr5hWsFMe_Xp_tQvF0,36172
|
|
13
|
+
PyCriCodecsEx/acb.py,sha256=qDJrwhSZCIEZzPV1kzqXf5KFqEID-S6ZrL2D-jMDdeU,11650
|
|
14
|
+
PyCriCodecsEx/awb.py,sha256=Y9MOTuW76ZdFEnW2e8MC-Hi9vdHJ7WFBsCRwqdpt3Jg,6231
|
|
15
|
+
PyCriCodecsEx/utf.py,sha256=ORSoyRrgBbdaGP6cQQejWfqkdWz6vEGG_sTo_fbO48Y,27555
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
CriCodecsEx.cpython-312-darwin.so,sha256=9XoZj_5oum7Lken8WyUrRpIz5QWa89SQqq2tosJd0v0,134720
|
|
2
|
-
pycricodecsex-0.0.4.dist-info/RECORD,,
|
|
3
|
-
pycricodecsex-0.0.4.dist-info/WHEEL,sha256=CltXN3lQvXbHxKDtiDwW0RNzF8s2WyBuPbOAX_ZeQlA,109
|
|
4
|
-
pycricodecsex-0.0.4.dist-info/top_level.txt,sha256=mSrrEse9hT0s6nl-sWAQWAhNRuZ6jo98pbFoN3L2MXk,26
|
|
5
|
-
pycricodecsex-0.0.4.dist-info/METADATA,sha256=z0Ofc7e4w_HYrIORaKSU2PHYeTIb-1bnEFmbEBvX-Vg,1256
|
|
6
|
-
pycricodecsex-0.0.4.dist-info/licenses/LICENSE,sha256=GyZb4dzF2tM3LU5I_tJXpHtUDz8297zeUuCJ5qz8io0,1063
|
|
7
|
-
PyCriCodecsEx/adx.py,sha256=tAEd2A2NbE0BJ_ARAN7gGFkN8XfFmGOSZy7aZpEKRCs,5959
|
|
8
|
-
PyCriCodecsEx/__init__.py,sha256=1mptEzQihbdyqqzMgdns_j5ZGK9gz7hR2bsgA_TnjO4,22
|
|
9
|
-
PyCriCodecsEx/chunk.py,sha256=ZYyeqqcBK6dDDj12YvrhpZDzW0iyOhysRlYuCD3rgQ8,2719
|
|
10
|
-
PyCriCodecsEx/hca.py,sha256=9A6hmL0EBFyrgf-Agr2K039HqX9cJoWr54Jm27XaDqA,19133
|
|
11
|
-
PyCriCodecsEx/cpk.py,sha256=cBZDLowGG7GCSJ8caPbj26t0inYGZ92Iwz_hL0hgOmU,37383
|
|
12
|
-
PyCriCodecsEx/usm.py,sha256=HKX0E33dtqBGZeNg6wZu9HPUj1rlaAVm3Ns9z0tAWxw,36356
|
|
13
|
-
PyCriCodecsEx/acb.py,sha256=Y0Tjq24uUlb0RJfmodxjkezk5BFQP2K3ZcDXNKxBhZg,11250
|
|
14
|
-
PyCriCodecsEx/awb.py,sha256=Y9MOTuW76ZdFEnW2e8MC-Hi9vdHJ7WFBsCRwqdpt3Jg,6231
|
|
15
|
-
PyCriCodecsEx/utf.py,sha256=ORSoyRrgBbdaGP6cQQejWfqkdWz6vEGG_sTo_fbO48Y,27555
|
|
File without changes
|
|
File without changes
|
|
File without changes
|