Closed xandramax closed 2 years ago
Compiles with these warnings:
In file included from src/PalletTownWavesSystem.cpp:19:
src/dsp/nintendo_gameboy.hpp: In member function 'void NintendoGBS::write_osc(int, int, int)':
src/dsp/nintendo_gameboy.hpp:516:16: warning: this statement may fall through [-Wimplicit-fallthrough=]
516 | sq = &pulse1;
| ~~~^~~~~~~~~
src/dsp/nintendo_gameboy.hpp:517:9: note: here
517 | case 1:
| ^~~~
In member function 'void NintendoGBS::reset()',
inlined from 'void ChipModule<ChipEmulator>::onReset() [with ChipEmulator = NintendoGBS]' at src/engine/chip_module.hpp:116:31:
src/dsp/nintendo_gameboy.hpp:666:15: warning: 'void* memcpy(void*, const void*, size_t)' forming offset [16, 31] is out of the bounds [0, 16] of object 'initial_wave' with type 'const uint8_t [16]' {aka 'const unsigned char [16]'} [-Warray-bounds]
666 | memcpy(wave.wave, initial_wave, sizeof wave.wave);
| ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/dsp/nintendo_gameboy.hpp: In member function 'void ChipModule<ChipEmulator>::onReset() [with ChipEmulator = NintendoGBS]':
src/dsp/nintendo_gameboy.hpp:662:34: note: 'initial_wave' declared here
662 | static constexpr uint8_t initial_wave[] = {
| ^~~~~~~~~~~~
In member function 'void NintendoGBS::reset()',
inlined from 'void ChipModule<ChipEmulator>::onReset() [with ChipEmulator = NintendoGBS]' at src/engine/chip_module.hpp:116:31,
inlined from 'virtual void PalletTownWavesSystem::onReset()' at src/PalletTownWavesSystem.cpp:115:41:
src/dsp/nintendo_gameboy.hpp:666:15: warning: 'void* memcpy(void*, const void*, size_t)' forming offset [16, 31] is out of the bounds [0, 16] of object 'initial_wave' with type 'const uint8_t [16]' {aka 'const unsigned char [16]'} [-Warray-bounds]
666 | memcpy(wave.wave, initial_wave, sizeof wave.wave);
| ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/dsp/nintendo_gameboy.hpp: In member function 'virtual void PalletTownWavesSystem::onReset()':
src/dsp/nintendo_gameboy.hpp:662:34: note: 'initial_wave' declared here
662 | static constexpr uint8_t initial_wave[] = {
| ^~~~~~~~~~~~
In member function 'void NintendoGBS::reset()',
inlined from 'NintendoGBS::NintendoGBS()' at src/dsp/nintendo_gameboy.hpp:559:14,
inlined from 'ChipModule<ChipEmulator>::ChipModule(float) [with ChipEmulator = NintendoGBS]' at src/engine/chip_module.hpp:81:45,
inlined from 'PalletTownWavesSystem::PalletTownWavesSystem()' at src/PalletTownWavesSystem.cpp:79:55:
src/dsp/nintendo_gameboy.hpp:666:15: warning: 'void* memcpy(void*, const void*, size_t)' forming offset [16, 31] is out of the bounds [0, 16] of object 'initial_wave' with type 'const uint8_t [16]' {aka 'const unsigned char [16]'} [-Warray-bounds]
666 | memcpy(wave.wave, initial_wave, sizeof wave.wave);
| ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/dsp/nintendo_gameboy.hpp: In constructor 'PalletTownWavesSystem::PalletTownWavesSystem()':
src/dsp/nintendo_gameboy.hpp:662:34: note: 'initial_wave' declared here
662 | static constexpr uint8_t initial_wave[] = {
| ^~~~~~~~~~~~
In member function 'void NintendoGBS::reset()',
inlined from 'void ChipModule<ChipEmulator>::onReset() [with ChipEmulator = NintendoGBS]' at src/engine/chip_module.hpp:116:31,
inlined from 'ChipModule<ChipEmulator>::ChipModule(float) [with ChipEmulator = NintendoGBS]' at src/engine/chip_module.hpp:94:16,
inlined from 'PalletTownWavesSystem::PalletTownWavesSystem()' at src/PalletTownWavesSystem.cpp:79:55:
src/dsp/nintendo_gameboy.hpp:666:15: warning: 'void* memcpy(void*, const void*, size_t)' forming offset [16, 31] is out of the bounds [0, 16] of object 'initial_wave' with type 'const uint8_t [16]' {aka 'const unsigned char [16]'} [-Warray-bounds]
666 | memcpy(wave.wave, initial_wave, sizeof wave.wave);
| ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/dsp/nintendo_gameboy.hpp: In constructor 'PalletTownWavesSystem::PalletTownWavesSystem()':
src/dsp/nintendo_gameboy.hpp:662:34: note: 'initial_wave' declared here
662 | static constexpr uint8_t initial_wave[] = {
| ^~~~~~~~~~~~
In file included from src/SuperEcho.cpp:19:
src/dsp/sony_s_dsp/echo.hpp: In member function 'void SonyS_DSP::Echo::reset()':
src/dsp/sony_s_dsp/echo.hpp:82:48: warning: 'void* memset(void*, int, size_t)' clearing an object of non-trivial type 'struct SonyS_DSP::StereoSample'; use assignment or value-initialization instead [-Wclass-memaccess]
82 | memset(fir_buffer, 0, sizeof fir_buffer);
| ^
In file included from src/dsp/sony_s_dsp/echo.hpp:22,
from src/SuperEcho.cpp:19:
src/dsp/sony_s_dsp/common.hpp:200:44: note: 'struct SonyS_DSP::StereoSample' declared here
200 | struct __attribute__((packed, aligned(4))) StereoSample {
In file included from ../../Rack/include/rack.hpp:34,
from src/plugin.hpp:16,
from src/SuperSampler.cpp:16:
../../Rack/include/helpers.hpp: In instantiation of 'rack::engine::Module* rack::createModel(std::string)::TModel::createModule() [with TModule = SuperSampler; TModuleWidget = SuperSamplerWidget]':
../../Rack/include/helpers.hpp:42:2: required from 'rack::plugin::Model* rack::createModel(std::string) [with TModule = SuperSampler; TModuleWidget = SuperSamplerWidget; std::string = std::__cxx11::basic_string<char>]'
src/SuperSampler.cpp:256:94: required from here
../../Rack/include/helpers.hpp:27:24: warning: 'new' of type 'SuperSampler' with extended alignment 32 [-Waligned-new=]
27 | engine::Module* m = new TModule;
| ^~~~~~~~~~~
../../Rack/include/helpers.hpp:27:24: note: uses 'void* operator new(std::size_t)', which does not have an alignment parameter
../../Rack/include/helpers.hpp:27:24: note: use '-faligned-new' to enable C++17 over-aligned new support
Hey @anlexmatos! Good to hear from you again. Thanks for putting this PR together :) I'll review this weekend and get a release pushed out for v2 finally. I've been meaning to for some time, but have been super busy.
Happy to help! Besides, I needed a break from my own code, and Super Echo has been sorely missed from my harpejji FX patch!
Closing; no longer relevant
Description
Type of change
Please select all relevant options:
How Has This Been Tested?
Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration
Test Configuration
Checklist