mirror of
https://github.com/bsnes-emu/bsnes.git
synced 2025-08-30 12:59:52 +02:00
Update to 20180730 release.
byuu says: These WIPs-within-WIPs are getting more and more broken ... this isn't going the way I wanted. But ... this time around, I've revamped the entire ruby API again, to solve a bunch of tough problems that have always made using ruby really clunky. But there are *so many* ruby drivers that it's going to take a long time to work through them all. This WIP is only going to run bsnes, and only on FreeBSD, and only with some drivers. hiro's Application::initialize() now calls hiro::initialize(), which you define inside of your hiro apps. This lets you call Application::setName(...) before anything else in hiro runs. This is essential on Xorg to set program icons, for instance. With the ruby rewrite and the change to hiro, I can get away from the need to make everything in bsnes/higan pointers to objects, and can now just declare them as regular objects.
This commit is contained in:
@@ -6,7 +6,7 @@
|
||||
namespace nall { namespace DSP { namespace Resampler {
|
||||
|
||||
struct Cubic {
|
||||
inline auto reset(double inputFrequency, double outputFrequency, uint queueSize = 0) -> void;
|
||||
inline auto reset(double inputFrequency, double outputFrequency = 0, uint queueSize = 0) -> void;
|
||||
inline auto setInputFrequency(double inputFrequency) -> void;
|
||||
inline auto pending() const -> bool;
|
||||
inline auto read() -> double;
|
||||
@@ -24,13 +24,12 @@ private:
|
||||
|
||||
auto Cubic::reset(double inputFrequency, double outputFrequency, uint queueSize) -> void {
|
||||
this->inputFrequency = inputFrequency;
|
||||
this->outputFrequency = outputFrequency;
|
||||
if(!queueSize) queueSize = outputFrequency * 0.02; //20ms
|
||||
this->outputFrequency = outputFrequency ? outputFrequency : this->inputFrequency;
|
||||
|
||||
ratio = inputFrequency / outputFrequency;
|
||||
fraction = 0.0;
|
||||
for(auto& sample: history) sample = 0.0;
|
||||
samples.resize(queueSize);
|
||||
for(auto& sample : history) sample = 0.0;
|
||||
samples.resize(queueSize ? queueSize : this->outputFrequency * 0.02); //default to 20ms max queue size
|
||||
}
|
||||
|
||||
auto Cubic::setInputFrequency(double inputFrequency) -> void {
|
||||
|
Reference in New Issue
Block a user