Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add getSampleRate() #24

Open
wants to merge 1 commit into
base: default
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions rubberband/RubberBandStretcher.h
Original file line number Diff line number Diff line change
Expand Up @@ -700,6 +700,11 @@ class RubberBandStretcher
*/
size_t getChannelCount() const;

/**
* Return the sample rate this stretcher was constructed with.
*/
size_t getSampleRate() const;

/**
* Force the stretcher to calculate a stretch profile. Normally
* this happens automatically for the first process() call in
Expand Down
6 changes: 6 additions & 0 deletions src/RubberBandStretcher.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,12 @@ RubberBandStretcher::getChannelCount() const
return m_d->getChannelCount();
}

size_t
RubberBandStretcher::getSampleRate() const
{
return m_d->getSampleRate();
}

void
RubberBandStretcher::calculateStretch()
{
Expand Down
6 changes: 5 additions & 1 deletion src/StretcherImpl.h
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,11 @@ class RubberBandStretcher::Impl
size_t getChannelCount() const {
return m_channels;
}


size_t getSampleRate() const {
return m_sampleRate;
}

void calculateStretch();

void setDebugLevel(int level);
Expand Down