fix: Fix header size assert
> probably wont ever matter, change for consistency to use `adpcm_ms` header size instead
This commit is contained in:
+3
-3
@@ -295,7 +295,7 @@ public:
|
|||||||
[[nodiscard]] static constexpr size_t assertsz_asf(size_t sz, int8_t resampler = 1) noexcept
|
[[nodiscard]] static constexpr size_t assertsz_asf(size_t sz, int8_t resampler = 1) noexcept
|
||||||
{
|
{
|
||||||
resampler = (resampler > 1 || resampler == -1) ? 2 : 1; // resampler ratio multiplier (see pcm_resampler enum, original data is float)
|
resampler = (resampler > 1 || resampler == -1) ? 2 : 1; // resampler ratio multiplier (see pcm_resampler enum, original data is float)
|
||||||
return static_cast<size_t>(static_cast<double>(sz) * 14.8) * resampler + WAVHDRSIZE; // 0.wma is consistent 180 therefore VBR Q90, sometimes 160 though, but samples are all over the place
|
return static_cast<size_t>(static_cast<double>(sz) * 14.8) * resampler + WAVHDRMAX; // 0.wma is consistent 180 therefore VBR Q90, sometimes 160 though, but samples are all over the place
|
||||||
}
|
}
|
||||||
[[nodiscard]] constexpr const decltype(bank::header) *header() const noexcept
|
[[nodiscard]] constexpr const decltype(bank::header) *header() const noexcept
|
||||||
{
|
{
|
||||||
@@ -341,7 +341,7 @@ public:
|
|||||||
~snd_2dx();
|
~snd_2dx();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
static constexpr size_t WAVHDRSIZE = 44;
|
static constexpr size_t WAVHDRMAX = 78;
|
||||||
static constexpr size_t ALLOCSIZE = 4 * 1024 * 1024;
|
static constexpr size_t ALLOCSIZE = 4 * 1024 * 1024;
|
||||||
struct bank *bank_;
|
struct bank *bank_;
|
||||||
size_t banksz_;
|
size_t banksz_;
|
||||||
@@ -918,7 +918,7 @@ void init(HINSTANCE hmodule, const char *ext)
|
|||||||
log_warning("hooks::soundbank", "Unsupported game version({}), skipping..", ext);
|
log_warning("hooks::soundbank", "Unsupported game version({}), skipping..", ext);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
log_info("hooks::soundbank", "Using user supplied offsets({}), support may be limited..", offset_.TX_BmsbEnumValidSoundbanks);
|
log_info("hooks::soundbank", "Using user supplied offsets(0x{:x}), support may be limited..", offset_.TX_BmsbEnumValidSoundbanks);
|
||||||
}
|
}
|
||||||
log_info("hooks::soundbank", "Supported game version({})", ext);
|
log_info("hooks::soundbank", "Supported game version({})", ext);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user