Merge pull request #345 from atsushieno/fix-debug-build
Fix build: update debug messages and assertions to match the latest API.
This commit is contained in:
commit
1d3346012f
2 changed files with 4 additions and 4 deletions
|
|
@ -207,7 +207,7 @@ absl::optional<sfz::FileInformation> sfz::FilePool::getFileInformation(const Fil
|
||||||
const unsigned channels = reader->channels();
|
const unsigned channels = reader->channels();
|
||||||
|
|
||||||
if (channels != 1 && channels != 2) {
|
if (channels != 1 && channels != 2) {
|
||||||
DBG("[sfizz] Missing logic for " << sndFile.channels() << " channels, discarding sample " << fileId);
|
DBG("[sfizz] Missing logic for " << reader->channels() << " channels, discarding sample " << fileId);
|
||||||
return {};
|
return {};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -398,7 +398,7 @@ void sfz::FilePool::loadingThread() noexcept
|
||||||
std::error_code readError;
|
std::error_code readError;
|
||||||
AudioReaderPtr reader = createAudioReader(file, promise->fileId.isReverse(), &readError);
|
AudioReaderPtr reader = createAudioReader(file, promise->fileId.isReverse(), &readError);
|
||||||
if (readError) {
|
if (readError) {
|
||||||
DBG("[sfizz] libsndfile errored for " << promise->fileId << " with message " << readError.what());
|
DBG("[sfizz] libsndfile errored for " << promise->fileId << " with message " << readError.message());
|
||||||
promise->dataStatus = FilePromise::DataStatus::Error;
|
promise->dataStatus = FilePromise::DataStatus::Error;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -139,8 +139,8 @@ void sfz::Oversampler::stream(AudioSpan<float> input, AudioSpan<float> output, s
|
||||||
|
|
||||||
void sfz::Oversampler::stream(AudioReader& input, AudioSpan<float> output, std::atomic<size_t>* framesReady)
|
void sfz::Oversampler::stream(AudioReader& input, AudioSpan<float> output, std::atomic<size_t>* framesReady)
|
||||||
{
|
{
|
||||||
ASSERT(output.getNumFrames() >= input.getNumFrames() * static_cast<int>(factor));
|
ASSERT(output.getNumFrames() >= input.frames() * static_cast<int>(factor));
|
||||||
ASSERT(output.getNumChannels() == input.getNumChannels());
|
ASSERT(output.getNumChannels() == input.channels());
|
||||||
|
|
||||||
const auto numFrames = static_cast<size_t>(input.frames());
|
const auto numFrames = static_cast<size_t>(input.frames());
|
||||||
const auto numChannels = input.channels();
|
const auto numChannels = input.channels();
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue