Comments (5)
@bjkwon I was having the same problem and it seems that you are supposed to call src_process
one more time, after sending the last block of input data, with input_frames = 0
. This returns the last few missing samples.
from libsamplerate.
Yes, as @Ashymad says, you are supposed to keep calling src_proccess
with zero input samples and the end_of_input
field set to 1
until you get not more output samples.
The examples do this, for example examples/timewarp-file.c
.
from libsamplerate.
I assume this is the change you are talking about:
diff --git a/src/src_sinc.c b/src/src_sinc.c
index 6b465a7..6379ea0 100644
--- a/src/src_sinc.c
+++ b/src/src_sinc.c
@@ -372,7 +372,7 @@ sinc_mono_vari_process (SRC_PRIVATE *psrc, SRC_DATA *data)
terminate = 1.0 / src_ratio + 1e-20 ;
/* Main processing loop. */
- while (filter->out_gen < filter->out_count)
+ while (1)
{
/* Need to reload buffer? */
samples_in_hand = (filter->b_end - filter->b_current + filter->b_len) % filter->b_len ;
With that change, the test suite fails with a segfault.
from libsamplerate.
Hmm... A quick fix is not a good fix, I guess.
Then, I would appreciate a proper way to address this issue.
Or, was there anything I missed? Perhaps was I calling src_process a wrong way? That is possible because I had to do a lot of guesswork while using it.
from libsamplerate.
I am still unconvinced that there even is an issue. This is a widely used library, that has changed little in a decade and it has a comprehensive test suite.
The tests and the example code in this repo show how to use src_process
.
from libsamplerate.
Related Issues (20)
- Deprecation warning CMP0091 HOT 4
- src_simple with sndfile HOT 2
- No anti-aliasing filter for linear resampling HOT 5
- Input samples needed to get n output samples? HOT 1
- src_process - zipper noise HOT 3
- Libsamplerate as fractional sample rate converter ? HOT 2
- Slow `lrint()` `lrintf()` functions in the release Windows build. HOT 12
- Fix Gihub Actions CI
- fail to build with Xcode in universal binary on OSX HOT 4
- need help with resampling the waveform in macOS HOT 1
- Don't work with more than 15 channels HOT 2
- Varispeed but preserve pitch HOT 1
- typo in libsamplerate/docs/api_full.md HOT 3
- Inconsistent input_frames_used/output_frames_gen among the numbers of channels
- Out of bound array access in src_linear.c HOT 2
- (minor) Warnings for lrint when compiling in Xcode for iOS HOT 1
- CI macOS build fails with 'You must have libtool installed to compile libsamplerate.'
- Int16 support? HOT 7
- CMake deprecation warning
- One input frame is not enough for variable ratio
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from libsamplerate.