Comments (4)
It has been a long time since I last touched that part of the code, but I think what you are looking for is this: NVDSP.mm#L75
So in fact, the buffer is copied starting from the 3rd index, just like your line does, using &(tInputBuffer[2])
. The code in NVDSP is presented in a different way than the page you mentioned, but operates in a similar way. Each time, 2 samples are stored to ensure a smooth transition between buffers. An error in this process will immediately lead to noticeable distortion. The buffers are very short, and without handling trailing/leading samples correctly, a fast "clicking" distortion will be introduced at each new buffer that calls filterContiguousData
.
I will close this for now, but please correct me if I am wrong and definitely let me know if you do hear any distortion caused by the problem you mentioned.
from nvdsp.
Strangely, there is no difference in audio either way, with or without +2! But I believe the way vDSP_deq22() works is, the output data start at +2. A lot of examples on the Internet confirm that.
from nvdsp.
Hmm, even the official API states "This function creates N new values in output vector C, beginning with its third element." - apple_ref/c/func/vDSP_deq22
I looked into it and I think the only difference is that NVDSP outputs the first two samples (in gInputKeepBuffer
) the very first time, but after that it does not matter (in practice) whether you output +2, because the buffer start/end still connect perfectly. If this is true, NVDSP introduces a 2-sample delay though, which is what I will look for now. I will do some testing and let you know what I find. I will ask you to make a merge request if you want to - for the Github love.
from nvdsp.
@crontab Tested it, and you were right, using the +2
is slightly better, it prevents the 2 samples delay and leads to the same audio. Could you make a merge request with the new line?
memcpy(data, tOutputBuffer + 2, numFrames * sizeof(float));
from nvdsp.
Related Issues (20)
- How to make custom audio EQ HOT 1
- Can we save audio file after applying filters? HOT 1
- Thread safety and efficiency HOT 11
- 3-band EQ HOT 1
- Support with AVPlayer and AVAudioPlayer HOT 1
- Some Interruption when the app go to background HOT 3
- How to filter audio that is hosted on server HOT 3
- How to implement bass boost using high pass filter? any idea? HOT 3
- Issue with headphones HOT 1
- No tag 0.0.1 HOT 1
- Fail compile HOT 1
- No tag v0.0.1 HOT 1
- RingBuffer HOT 2
- Feed it the next song... HOT 8
- How to get audio data to use from microphone. HOT 1
- can i use directly with lib `FreeStreamer` to process audio HOT 7
- BandPass filter help HOT 1
- who can help me to build a 10-band-eq example?
- Is there anyway to use NVDSP in Swift?
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 nvdsp.