-
Notifications
You must be signed in to change notification settings - Fork 62
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
java.lang.IllegalArgumentException while run this project. #7
Comments
I met this problem too ! Did you find a solution ? |
I found this into the SSRC class source code : rawoutbuf.limit((int) (dbps * nch * (Math.floor((double) sumread * dfrq / sfrq) + 2 + sumwrite + nsmplwrt2 - delay))); //TODO fails with short signals (think that fixed this) |
Any idea to fix this ByteBuffer limit calculation ? |
pull requests are welcome |
I solved this problem: int limit = bps * nch * toberead; |
@hubin858130 , can you create a pull request? |
Hi,
I'm a rookie on pcm process, would you please help resolve the issue in your project?
Thanks
Alex
Logs are following:
file name is /mono_short_test.wav
channels is 1
frame size is 2
frame rate is 44100.0
Exception in thread "Thread-0" java.lang.IllegalArgumentException
at java.nio.Buffer.limit(Unknown Source)
at vavi.sound.pcm.resampling.ssrc.SSRC.downsample(SSRC.java:1579)
at vavi.sound.pcm.resampling.ssrc.SSRC.(SSRC.java:2440)
at com.jssrc.resample.JSSRCResampler$1.run(JSSRCResampler.java:66)
at java.lang.Thread.run(Unknown Source)
file name is /stereo_long_test.wav
channels is 2
frame size is 4
frame rate is 44100.0
Exception in thread "Thread-3" java.lang.IllegalArgumentException
at java.nio.Buffer.limit(Unknown Source)
at vavi.sound.pcm.resampling.ssrc.SSRC.upsample(SSRC.java:648)
at vavi.sound.pcm.resampling.ssrc.SSRC.(SSRC.java:2438)
at com.jssrc.resample.JSSRCResampler$1.run(JSSRCResampler.java:66)
at java.lang.Thread.run(Unknown Source)
The text was updated successfully, but these errors were encountered: