sfztools/sfizz

Demos and Benchmarks require review

redtide opened this issue · 1 comments

EDIT: Some temporary fixes were applied in #1167 to be able to build them but still need some work, see comment below.

Benchmarks:

In file included from /home/redtide/Documenti/Sviluppo/SFZTools/sfizz/benchmarks/BM_ADSR.cpp:9:
/home/redtide/Documenti/Sviluppo/SFZTools/sfizz/benchmarks/BM_ADSR.cpp: In constructor ‘EnvelopeFixture_Block_Benchmark::EnvelopeFixture_Block_Benchmark()’:
/home/redtide/Documenti/Sviluppo/SFZTools/sfizz/benchmarks/BM_ADSR.cpp:43:1: error: use of deleted function ‘EnvelopeFixture::EnvelopeFixture()’
   43 | BENCHMARK_DEFINE_F(EnvelopeFixture, Block)(benchmark::State& state)
      | ^~~~~~~~~~~~~~~~~~
/home/redtide/Documenti/Sviluppo/SFZTools/sfizz/benchmarks/BM_ADSR.cpp:22:7: note: ‘EnvelopeFixture::EnvelopeFixture()’ is implicitly deleted because the default definition would be ill-formed:
   22 | class EnvelopeFixture : public benchmark::Fixture
      |       ^~~~~~~~~~~~~~~
/home/redtide/Documenti/Sviluppo/SFZTools/sfizz/benchmarks/BM_ADSR.cpp:22:7: error: no matching function for call to ‘sfz::ADSREnvelope::ADSREnvelope()’
In file included from /home/redtide/Documenti/Sviluppo/SFZTools/sfizz/benchmarks/BM_ADSR.cpp:8:
/home/redtide/Documenti/Sviluppo/SFZTools/sfizz/src/sfizz/ADSREnvelope.h:21:5: note: candidate: ‘sfz::ADSREnvelope::ADSREnvelope(const sfz::MidiState&)’
   21 |     ADSREnvelope(const MidiState& state)
      |     ^~~~~~~~~~~~
/home/redtide/Documenti/Sviluppo/SFZTools/sfizz/src/sfizz/ADSREnvelope.h:21:5: note:   candidate expects 1 argument, 0 provided
/home/redtide/Documenti/Sviluppo/SFZTools/sfizz/src/sfizz/ADSREnvelope.h:17:7: note: candidate: ‘constexpr sfz::ADSREnvelope::ADSREnvelope(const sfz::ADSREnvelope&)’
   17 | class ADSREnvelope {
      |       ^~~~~~~~~~~~
/home/redtide/Documenti/Sviluppo/SFZTools/sfizz/src/sfizz/ADSREnvelope.h:17:7: note:   candidate expects 1 argument, 0 provided
/home/redtide/Documenti/Sviluppo/SFZTools/sfizz/src/sfizz/ADSREnvelope.h:17:7: note: candidate: ‘constexpr sfz::ADSREnvelope::ADSREnvelope(sfz::ADSREnvelope&&)’
/home/redtide/Documenti/Sviluppo/SFZTools/sfizz/src/sfizz/ADSREnvelope.h:17:7: note:   candidate expects 1 argument, 0 provided
/home/redtide/Documenti/Sviluppo/SFZTools/sfizz/benchmarks/BM_ADSR.cpp: In member function ‘virtual void EnvelopeFixture_Block_Benchmark::BenchmarkCase(benchmark::State&)’:
/home/redtide/Documenti/Sviluppo/SFZTools/sfizz/benchmarks/BM_ADSR.cpp:46:23: error: no matching function for call to ‘sfz::ADSREnvelope::reset(sfz::EGDescription&, sfz::Region&, sfz::MidiState&, int, int, const float&)’
   46 |         envelope.reset(region.amplitudeEG, region, midiState, 0, 0, sampleRate);
      |         ~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/redtide/Documenti/Sviluppo/SFZTools/sfizz/src/sfizz/ADSREnvelope.h:33:10: note: candidate: ‘void sfz::ADSREnvelope::reset(const sfz::EGDescription&, const sfz::Region&, int, float, float)’
   33 |     void reset(const EGDescription& desc, const Region& region, int delay, float velocity, float sampleRate) noexcept;
      |          ^~~~~
/home/redtide/Documenti/Sviluppo/SFZTools/sfizz/src/sfizz/ADSREnvelope.h:33:10: note:   candidate expects 5 arguments, 6 provided

Demos error log is even bigger, including some references to sndfile.hh; it looks like an old API related issue.

Some files use bundled dr_{flac|wav}.h and explicit use of sndfile.hh: it would be nice to have a global replacement in the entire library with st_audiofile function replacement utilities, and so removing SFIZZ_USE_SNDFILE define checks (if not dropping entirely sndfile and use dr_libs only).

  • BM_ADSR.cpp: API changes issues
  • BM_Logger.cpp: requires a src/sfizz/Logger.h deleted in 7f35217
  • BM_resample.cpp: see comment above
  • BM_flacfile.cpp: see comment (temporary fixed)
  • BM_wavfile.cpp: see comment (temporary fixed)
  • BM_audioReaders.cpp: uses a createExplicitAudioReader() deleted in 803052b, not sure if createAudioReader() is the needed replacement in this case
  • BM_readChunk.cpp: see comment
  • BM_readChunkFlac.cpp: see comment