Skip to content

Commit

Permalink
Add more constructors
Browse files Browse the repository at this point in the history
  • Loading branch information
jurihock committed Nov 17, 2023
1 parent 6b5877f commit 16c33e6
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions cpp/StftPitchShift/STFT.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@
#include <vector>

#include <StftPitchShift/FFT.h>
#include <StftPitchShift/RFFT.h>

#include <StftPitchShift/Timer.h>

namespace stftpitchshift
Expand All @@ -23,11 +25,21 @@ namespace stftpitchshift

public:

STFT(const size_t framesize, const size_t hopsize, const bool chronometry = false) :
STFT(std::make_shared<RFFT>(), std::make_tuple(framesize, framesize), hopsize, chronometry)
{
}

STFT(const std::shared_ptr<FFT> fft, const size_t framesize, const size_t hopsize, const bool chronometry = false) :
STFT(fft, std::make_tuple(framesize, framesize), hopsize, chronometry)
{
}

STFT(const std::tuple<size_t, size_t> framesize, const size_t hopsize, const bool chronometry = false) :
STFT(std::make_shared<RFFT>(), framesize, hopsize, chronometry)
{
}

STFT(const std::shared_ptr<FFT> fft, const std::tuple<size_t, size_t> framesize, const size_t hopsize, const bool chronometry = false) :
fft(fft),
framesize(framesize),
Expand Down

0 comments on commit 16c33e6

Please sign in to comment.