Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package libresidfp for openSUSE:Factory checked in at 2026-08-09 21:43:56 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/libresidfp (Old) and /work/SRC/openSUSE:Factory/.libresidfp.new.16738 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "libresidfp" Sun Aug 9 21:43:56 2026 rev:7 rq:1370354 version:1.2.1 Changes: -------- --- /work/SRC/openSUSE:Factory/libresidfp/libresidfp.changes 2026-07-17 18:51:24.081153228 +0200 +++ /work/SRC/openSUSE:Factory/.libresidfp.new.16738/libresidfp.changes 2026-08-09 21:46:01.404132475 +0200 @@ -1,0 +2,6 @@ +Sat Aug 8 19:12:03 UTC 2026 - Илья Индиго <[email protected]> + +- Updated to 1.2.1 + * https://github.com/libsidplayfp/libresidfp/releases/tag/v1.2.1 + +------------------------------------------------------------------- Old: ---- libresidfp-1.1.2.tar.gz New: ---- libresidfp-1.2.1.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ libresidfp.spec ++++++ --- /var/tmp/diff_new_pack.GRrySu/_old 2026-08-09 21:46:01.944150908 +0200 +++ /var/tmp/diff_new_pack.GRrySu/_new 2026-08-09 21:46:01.948151045 +0200 @@ -17,7 +17,7 @@ %define sover 0 Name: libresidfp -Version: 1.1.2 +Version: 1.2.1 Release: 0 Summary: Cycle exact SID emulation License: GPL-2.0-or-later ++++++ libresidfp-1.1.2.tar.gz -> libresidfp-1.2.1.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libresidfp-1.1.2/NEWS.md new/libresidfp-1.2.1/NEWS.md --- old/libresidfp-1.1.2/NEWS.md 2026-07-17 10:46:03.000000000 +0200 +++ new/libresidfp-1.2.1/NEWS.md 2026-08-08 18:04:43.000000000 +0200 @@ -1,3 +1,15 @@ +1.2.1 2026-08-08 +* Fixed external filter parameter range + + + +1.2.0 2026-08-07 +* Make DAC leakage adjustable (#10) +* Make the 6581 waveform offset adjustable (#13) +* Make external filter configurable (#44) + + + 1.1.2 2026-07-17 * Removed typo in configure script diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libresidfp-1.1.2/configure new/libresidfp-1.2.1/configure --- old/libresidfp-1.1.2/configure 2026-07-17 10:46:07.000000000 +0200 +++ new/libresidfp-1.2.1/configure 2026-08-08 18:04:46.000000000 +0200 @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.71 for libresidfp 1.1.2. +# Generated by GNU Autoconf 2.71 for libresidfp 1.2.1. # # # Copyright (C) 1992-1996, 1998-2017, 2020-2021 Free Software Foundation, @@ -618,8 +618,8 @@ # Identity of this package. PACKAGE_NAME='libresidfp' PACKAGE_TARNAME='libresidfp' -PACKAGE_VERSION='1.1.2' -PACKAGE_STRING='libresidfp 1.1.2' +PACKAGE_VERSION='1.2.1' +PACKAGE_STRING='libresidfp 1.2.1' PACKAGE_BUGREPORT='' PACKAGE_URL='https://github.com/libsidplayfp/libresidfp/' @@ -1397,7 +1397,7 @@ # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures libresidfp 1.1.2 to adapt to many kinds of systems. +\`configure' configures libresidfp 1.2.1 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1468,7 +1468,7 @@ if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of libresidfp 1.1.2:";; + short | recursive ) echo "Configuration of libresidfp 1.2.1:";; esac cat <<\_ACEOF @@ -1591,7 +1591,7 @@ test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -libresidfp configure 1.1.2 +libresidfp configure 1.2.1 generated by GNU Autoconf 2.71 Copyright (C) 2021 Free Software Foundation, Inc. @@ -2260,7 +2260,7 @@ This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by libresidfp $as_me 1.1.2, which was +It was created by libresidfp $as_me 1.2.1, which was generated by GNU Autoconf 2.71. Invocation command line was $ $0$ac_configure_args_raw @@ -3748,7 +3748,7 @@ # Define the identity of the package. PACKAGE='libresidfp' - VERSION='1.1.2' + VERSION='1.2.1' printf "%s\n" "#define PACKAGE \"$PACKAGE\"" >>confdefs.h @@ -3895,8 +3895,8 @@ LIB_MAJOR=1 -LIB_MINOR=1 -LIB_LEVEL=2 +LIB_MINOR=2 +LIB_LEVEL=1 @@ -22398,9 +22398,9 @@ # # If any interfaces have been removed or changed since the last public release, then set age to 0. -LIBRESIDFPCUR=1 -LIBRESIDFPREV=2 -LIBRESIDFPAGE=1 +LIBRESIDFPCUR=2 +LIBRESIDFPREV=1 +LIBRESIDFPAGE=2 LIBRESIDFPVERSION=$LIBRESIDFPCUR:$LIBRESIDFPREV:$LIBRESIDFPAGE { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for debugging" >&5 @@ -23831,7 +23831,7 @@ # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by libresidfp $as_me 1.1.2, which was +This file was extended by libresidfp $as_me 1.2.1, which was generated by GNU Autoconf 2.71. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -23891,7 +23891,7 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config='$ac_cs_config_escaped' ac_cs_version="\\ -libresidfp config.status 1.1.2 +libresidfp config.status 1.2.1 configured by $0, generated by GNU Autoconf 2.71, with options \\"\$ac_cs_config\\" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libresidfp-1.1.2/configure.ac new/libresidfp-1.2.1/configure.ac --- old/libresidfp-1.1.2/configure.ac 2026-07-17 10:46:03.000000000 +0200 +++ new/libresidfp-1.2.1/configure.ac 2026-08-08 18:04:43.000000000 +0200 @@ -1,6 +1,6 @@ m4_define([lib_major], [1]) -m4_define([lib_minor], [1]) -m4_define([lib_level], [2]) +m4_define([lib_minor], [2]) +m4_define([lib_level], [1]) m4_define([lib_version], [lib_major.lib_minor.lib_level]) AC_PREREQ([2.62]) @@ -93,9 +93,9 @@ # # If any interfaces have been removed or changed since the last public release, then set age to 0. -LIBRESIDFPCUR=1 -LIBRESIDFPREV=2 -LIBRESIDFPAGE=1 +LIBRESIDFPCUR=2 +LIBRESIDFPREV=1 +LIBRESIDFPAGE=2 LIBRESIDFPVERSION=$LIBRESIDFPCUR:$LIBRESIDFPREV:$LIBRESIDFPAGE AC_MSG_CHECKING([for debugging]) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libresidfp-1.1.2/src/Dac.cpp new/libresidfp-1.2.1/src/Dac.cpp --- old/libresidfp-1.1.2/src/Dac.cpp 2026-07-17 10:46:03.000000000 +0200 +++ new/libresidfp-1.2.1/src/Dac.cpp 2026-08-08 18:04:43.000000000 +0200 @@ -69,7 +69,7 @@ return dacValue; } -void Dac::kinkedDac(ChipModel chipModel) +void Dac::kinkedDac(ChipModel chipModel, double leakLevel) { constexpr double R_INFINITY = 1e6; @@ -79,7 +79,7 @@ // 6581 DACs are not terminated by a 2R resistor const bool term = chipModel == CSG8580; - leakage = chipModel == MOS6581 ? MOSFET_LEAKAGE_6581 : MOSFET_LEAKAGE_8580; + leakage = leakLevel * (chipModel == MOS6581 ? MOSFET_LEAKAGE_6581 : MOSFET_LEAKAGE_8580); double Vsum = 0.; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libresidfp-1.1.2/src/Dac.h new/libresidfp-1.2.1/src/Dac.h --- old/libresidfp-1.1.2/src/Dac.h 2026-07-17 10:46:03.000000000 +0200 +++ new/libresidfp-1.2.1/src/Dac.h 2026-08-08 18:04:43.000000000 +0200 @@ -108,8 +108,9 @@ * Build DAC model for specific chip. * * @param chipModel 6581 or 8580 + * @param leakLevel the level of the transistor leakage */ - void kinkedDac(ChipModel chipModel); + void kinkedDac(ChipModel chipModel, double leakLevel=1.0); /** * Get the Vo output for a given combination of input bits. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libresidfp-1.1.2/src/ExternalFilter.cpp new/libresidfp-1.2.1/src/ExternalFilter.cpp --- old/libresidfp-1.1.2/src/ExternalFilter.cpp 2026-07-17 10:46:03.000000000 +0200 +++ new/libresidfp-1.2.1/src/ExternalFilter.cpp 2026-08-08 18:04:43.000000000 +0200 @@ -45,15 +45,27 @@ void ExternalFilter::setClockFrequency(double frequency) { - const double dt = 1. / frequency; + m_frequency = frequency; + recalcParams(); +} + +void ExternalFilter::setExtResistance(double res) +{ + m_ext_res = 1e3 + ((1. - res) * 9e3); + recalcParams(); +} + +void ExternalFilter::recalcParams() +{ + const double dt = 1. / m_frequency; // Low-pass: R = 10kOhm, C = 1000pF; w0l = dt/(dt+RC) = 1e-6/(1e-6+1e4*1e-9) = 0.091 - // Cutoff 1/2*PI*RC = 1/2*PI*1e4*1e-9 = 15915.5 Hz + // Cutoff 1/(2*PI*RC) = 1/(2*PI*1e4*1e-9) = 15915.5 Hz w0lp_1_s7 = static_cast<int32_t>((dt / (dt + getRC(10e3, 1000e-12))) * (1 << 7) + 0.5); - // High-pass: R = 10kOhm, C = 10uF; w0h = dt/(dt+RC) = 1e-6/(1e-6+1e4*1e-5) = 0.00000999 - // Cutoff 1/2*PI*RC = 1/2*PI*1e4*1e-5 = 1.59155 Hz - w0hp_1_s17 = static_cast<int32_t>((dt / (dt + getRC(10e3, 10e-6))) * (1 << 17) + 0.5); + // High-pass: R = 1-10kOhm, C = 10uF; w0h = dt/(dt+RC) + // Cutoff 1/(2*PI*RC) ∈ [1.59155,15.9155] Hz + w0hp_1_s17 = static_cast<int32_t>((dt / (dt + getRC(m_ext_res, 10e-6))) * (1 << 17) + 0.5); } void ExternalFilter::reset() diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libresidfp-1.1.2/src/ExternalFilter.h new/libresidfp-1.2.1/src/ExternalFilter.h --- old/libresidfp-1.1.2/src/ExternalFilter.h 2026-07-17 10:46:03.000000000 +0200 +++ new/libresidfp-1.2.1/src/ExternalFilter.h 2026-08-08 18:04:43.000000000 +0200 @@ -57,7 +57,7 @@ * GND * ~~~ * - * * Only for the 6581. + * * Pulldown resistor, only for the 6581. * ** The C64c board additionally includes a [bootstrap] capacitor to increase * the input impedance of the common collector. * @@ -98,6 +98,13 @@ int32_t w0hp_1_s17 = 0; + double m_frequency; + + double m_ext_res = 10e3; + +private: + void recalcParams(); + public: /** * SID clocking. @@ -115,11 +122,18 @@ /** * Setup of the external filter sampling parameters. * - * @param frequency the main system clock frequency + * @param frequency the main system clock frequency in Hertz */ void setClockFrequency(double frequency); /** + * Setup of the external filter sampling parameters. + * + * @param res the resistance value in Ohms + */ + void setExtResistance(double res); + + /** * SID reset. */ void reset(); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libresidfp-1.1.2/src/SID.cpp new/libresidfp-1.2.1/src/SID.cpp --- old/libresidfp-1.1.2/src/SID.cpp 2026-07-17 10:46:03.000000000 +0200 +++ new/libresidfp-1.2.1/src/SID.cpp 2026-08-08 18:04:43.000000000 +0200 @@ -24,6 +24,7 @@ #include "SID.h" +#include <algorithm> #include <limits> #include "array.h" @@ -137,11 +138,23 @@ constexpr int BUS_TTL_8580 = 0xa2000; //@} +// Clamp parameter in [0,1] range +double clamp(double param) +{ +#ifdef HAVE_CXX17 + return std::clamp(param, 0.0, 1.0); +#else + return std::max(std::min(param, 1.0), 0.0); +#endif +} + SID::SID() : filter6581(new Filter6581()), filter8580(new Filter8580()), resampler(nullptr), + offset_6581(OFFSET_6581), cws(AVERAGE), + dacLeakage(1.0), p(new Params) { voice[0].setOtherVoices(voice[2], voice[1]); @@ -161,19 +174,19 @@ void SID::setFilter6581Curve(double filterCurve) { - p->filterCurve6581 = filterCurve; + p->filterCurve6581 = clamp(filterCurve); filter6581->setFilterCurve(filterCurve); } void SID::setFilter6581Range(double adjustment) { - p->filterRange6581 = adjustment; + p->filterRange6581 = clamp(adjustment); filter6581->setFilterRange(adjustment); } void SID::setFilter8580Curve(double filterCurve) { - p->filterCurve8580 = filterCurve; + p->filterCurve8580 = clamp(filterCurve); filter8580->setFilterCurve(filterCurve); } @@ -252,7 +265,7 @@ // calculate envelope DAC table { Dac dacBuilder(ENV_DAC_BITS); - dacBuilder.kinkedDac(model); + dacBuilder.kinkedDac(model, dacLeakage); for (unsigned int i = 0; i < (1 << ENV_DAC_BITS); i++) { @@ -265,10 +278,9 @@ { Dac dacBuilder(OSC_DAC_BITS); - dacBuilder.kinkedDac(model); + dacBuilder.kinkedDac(model, dacLeakage); - //const double offset = dacBuilder.getOutput(is6581 ? OFFSET_6581 : OFFSET_8580); - const double offset = dacBuilder.getOutput(is6581 ? OFFSET_6581 : 0x7ff, is6581); + const double offset = dacBuilder.getOutput(is6581 ? offset_6581 : 0x800, is6581); for (unsigned int i = 0; i < (1 << OSC_DAC_BITS); i++) { @@ -539,7 +551,6 @@ } p->method = method; - p->clockFrequency = clockFrequency; p->samplingFrequency = samplingFrequency; } @@ -614,4 +625,22 @@ paddleY = y; } +void SID::setDacLeakage(double level) +{ + dacLeakage = clamp(level); + setChipModel(model); +} + +void SID::setOffset6581(double offset) +{ + // TODO determine a reasonable range + offset_6581 = 0x380 + static_cast<unsigned int>((1. - clamp(offset)) * 0x200); + setChipModel(model); +} + +void SID::setDCBRes(double res) +{ + externalFilter.setExtResistance(clamp(res)); +} + } // namespace reSIDfp diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libresidfp-1.1.2/src/SID.h new/libresidfp-1.2.1/src/SID.h --- old/libresidfp-1.1.2/src/SID.h 2026-07-17 10:46:03.000000000 +0200 +++ new/libresidfp-1.2.1/src/SID.h 2026-08-08 18:04:43.000000000 +0200 @@ -98,12 +98,17 @@ /// Time until #voiceSync must be run. unsigned int nextVoiceSync; + unsigned int offset_6581; + /// Currently active chip model. ChipModel model; /// Currently selected combined waveforms strength. CombinedWaveforms cws; + // Dac leakage + double dacLeakage; + /// Last written value uint8_t busValue; @@ -358,6 +363,21 @@ * Set paddle coordinates. */ void setPaddle(uint8_t x, uint8_t y); + + /* + * Set the DAC leakage level. + */ + void setDacLeakage(double level); + + /* + * Set the 6581 wave offset. + */ + void setOffset6581(double offset); + + /* + * Set the DC-Blocker resistance. + */ + void setDCBRes(double res); }; } // namespace reSIDfp diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libresidfp-1.1.2/src/State.cpp new/libresidfp-1.2.1/src/State.cpp --- old/libresidfp-1.1.2/src/State.cpp 2026-07-17 10:46:03.000000000 +0200 +++ new/libresidfp-1.2.1/src/State.cpp 2026-08-08 18:04:43.000000000 +0200 @@ -84,9 +84,11 @@ state.env3[i] = envelope->env3; } + state.dacLeakage = s.dacLeakage; state.bus_value = s.busValue; state.bus_value_ttl = s.busValueTtl; state.nextVoiceSync = s.nextVoiceSync; + state.offset_6581 = s.offset_6581; state.paddle_x = s.paddleX; state.paddle_y = s.paddleY; state.model = s.model; @@ -134,9 +136,10 @@ state.exVlp = s.externalFilter.Vlp; state.exVhp = s.externalFilter.Vhp; + state.ext_res = s.externalFilter.m_ext_res; + state.clockFrequency = s.externalFilter.m_frequency; state.method = s.p->method; - state.clockFrequency = s.p->clockFrequency; state.samplingFrequency = s.p->samplingFrequency; switch (s.p->method) @@ -194,9 +197,11 @@ State state; std::memcpy(&state, buffer, cnt); + s.dacLeakage = state.dacLeakage; s.busValue = state.bus_value; s.busValueTtl = state.bus_value_ttl; s.nextVoiceSync = state.nextVoiceSync; + s.offset_6581 = state.offset_6581; s.paddleX = state.paddle_x; s.paddleY = state.paddle_y; s.model = state.model; @@ -246,8 +251,10 @@ s.externalFilter.Vlp = state.exVlp; s.externalFilter.Vhp = state.exVhp; + s.externalFilter.m_ext_res = state.ext_res; s.setSamplingParameters(state.clockFrequency, state.method, state.samplingFrequency); + s.externalFilter.recalcParams(); for (int i = 0; i < 3; i++) { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libresidfp-1.1.2/src/State.h new/libresidfp-1.2.1/src/State.h --- old/libresidfp-1.1.2/src/State.h 2026-07-17 10:46:03.000000000 +0200 +++ new/libresidfp-1.2.1/src/State.h 2026-08-08 18:04:43.000000000 +0200 @@ -35,7 +35,6 @@ struct Params { SamplingMethod method; - double clockFrequency; double samplingFrequency; double filterCurve6581; double filterRange6581; @@ -63,8 +62,10 @@ // SID int bus_value_ttl; unsigned int nextVoiceSync; + unsigned int offset_6581; ChipModel model; CombinedWaveforms cws; + double dacLeakage; uint8_t bus_value; uint8_t paddle_x; uint8_t paddle_y; @@ -147,6 +148,7 @@ /// External filter int32_t exVlp; int32_t exVhp; + double ext_res; // Resampler double clockFrequency; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libresidfp-1.1.2/src/resample/SincResampler.cpp new/libresidfp-1.2.1/src/resample/SincResampler.cpp --- old/libresidfp-1.1.2/src/resample/SincResampler.cpp 2026-07-17 10:46:03.000000000 +0200 +++ new/libresidfp-1.2.1/src/resample/SincResampler.cpp 2026-08-08 18:04:43.000000000 +0200 @@ -1,7 +1,7 @@ /* * This file is part of libsidplayfp, a SID player engine. * - * Copyright 2011-2025 Leandro Nini <[email protected]> + * Copyright 2011-2026 Leandro Nini <[email protected]> * Copyright 2007-2010 Antti Lankila * Copyright 2004 Dag Lem <[email protected]> * @@ -41,8 +41,7 @@ # include <numbers> #endif - -#if __cplusplus >= 202306L +#if __cplusplus >= 201402L # define CONSTEXPR_FUNC constexpr # define CONSTEXPR_VAR constexpr #else @@ -141,7 +140,7 @@ out = std::inner_product(a, a+bLength, b, out); #else // Apparently clang is unable to fully optimize the above - // feed it some plain ol' c code + // feed it some plain ol' C code for (int i=0; i<bLength; i++) { out += a[i] * static_cast<int32_t>(b[i]); @@ -201,16 +200,20 @@ # endif #endif - // 16 bits -> -96dB stopband attenuation. - CONSTEXPR_VAR double A = -20. * std::log10(1.0 / (1 << BITS)); // A fraction of the bandwidth is allocated to the transition band, which we double // because we design the filter to transition halfway at nyquist. const double dw = (1. - 2.*highestAccurateFrequency / samplingFrequency) * PI * 2.; + // 16 bits -> -96dB stopband attenuation. +#if __cplusplus >= 202306L + constexpr double A = -20. * std::log10(1.0 / (1 << BITS)); +#else + constexpr double A = 96.3295986125; +#endif // For calculation of beta and N see the reference for the kaiserord // function in the MATLAB Signal Processing Toolbox: // http://www.mathworks.com/help/signal/ref/kaiserord.html - CONSTEXPR_VAR double beta = 0.1102 * (A - 8.7); + constexpr double beta = 0.1102 * (A - 8.7); CONSTEXPR_VAR double I0beta = I0(beta); const double cyclesPerSampleD = clockFrequency / samplingFrequency; const double inv_cyclesPerSampleD = samplingFrequency / clockFrequency; @@ -257,7 +260,7 @@ for (int i = 0; i < firRES; i++) { - const double jPhase = (double) i / firRES + firN_2; + const double jPhase = static_cast<double>(i) / static_cast<double>(firRES) + firN_2; for (int j = 0; j < firN; j++) { @@ -277,18 +280,18 @@ #ifdef RUNTIME_DISPATCH #define DISPATCH(simd, name) \ - if (__builtin_cpu_supports (#simd)) \ + (__builtin_cpu_supports (#simd)) \ simd_convolve = convolve_ ## name; - DISPATCH(avx512f, avx512f) + if DISPATCH(avx512f, avx512f) else - DISPATCH(avx2, avx2) + if DISPATCH(avx2, avx2) else - DISPATCH(sse4.1, sse4) + if DISPATCH(sse4.1, sse4) else - DISPATCH(sse2, sse2) + if DISPATCH(sse2, sse2) else - DISPATCH(mmx, mmx) + if DISPATCH(mmx, mmx) else simd_convolve = convolve; #endif diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libresidfp-1.1.2/src/residfp/residfp.cpp new/libresidfp-1.2.1/src/residfp/residfp.cpp --- old/libresidfp-1.1.2/src/residfp/residfp.cpp 2026-07-17 10:46:03.000000000 +0200 +++ new/libresidfp-1.2.1/src/residfp/residfp.cpp 2026-08-08 18:04:43.000000000 +0200 @@ -155,6 +155,11 @@ sid.enableOld6581caps(enable); } +void residfp::setOffset6581(double offset) +{ + sid.setOffset6581(offset); +} + void residfp::setPaddle(unsigned char x, unsigned char y) { sid.setPaddle(x, y); @@ -174,3 +179,13 @@ { State::restoreState(sid, buffer, size); } + +void residfp::setDacLeakage(double level) +{ + sid.setDacLeakage(level); +} + +void residfp::setDCBRes(double res) +{ + sid.setDCBRes(res); +} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libresidfp-1.1.2/src/residfp/residfp.h new/libresidfp-1.2.1/src/residfp/residfp.h --- old/libresidfp-1.1.2/src/residfp/residfp.h 2026-07-17 10:46:03.000000000 +0200 +++ new/libresidfp-1.2.1/src/residfp/residfp.h 2026-08-08 18:04:43.000000000 +0200 @@ -280,6 +280,36 @@ * @since 1.1 */ void restoreState(char* buffer, int size); + + /** + * Set the DAC leakage level. + * Affects the envelope and waveforms. + * + * @param level the leakage level, between 0 (no leakage) and 1 + * + * @since 1.2 + */ + void setDacLeakage(double level); + + /** + * Set the 6581 wave offset. + * Affects the volume of digi samples. + * + * @param offset the waveform offset, between 0 (faint digis) and 1 (loud digis) + * + * @since 1.2 + */ + void setOffset6581(double offset); + + /** + * Set the DC-Blocker resistance. + * Affects the highpass cutoff frequency. + * + * @param res the resistance value, between 0 (~1.6Hz) and 1 (~16Hz) + * + * @since 1.2 + */ + void setDCBRes(double res); }; }
