Re:Apple has copied some of the most popular apps in the App...
by ComputerGuru on Friday September 06, 2019 @02:40AM
(#20893563)
I hate to just say it like this, but it’s unlikely that C# is really your bottleneck. It’s more likely the approach or the libraries you are using that are the issue.
Try a clean implementation of that particular logic in pure C# on .NET Core, you should be able to get it working more than adequately fast. I’m saying this as someone that (re)writes applications in C++ and rust to provide pseudo-rt guarantees.
Re:Apple has copied some of the most popular apps in the App...
by merb on Friday September 06, 2019 @03:38AM
(#20893784)
yeah especially with Span<T> it's way easier to create high performance code, while reducing GC pressure.
Also depending on the Platform P/Invoke to C/C++ is also a solution that works quite better than on Java's JNI.
Re:Apple has copied some of the most popular apps in the App...
by holy_city on Friday September 06, 2019 @03:13AM
(#20893685)
>applies an ambisonic convoluted reverberation impulse response to an audio stream
Yikes. If you're doing naive convolution that's O(n^2) in real time.
Try reading up on partitioned convolution techniques via FFT. The current state of the art in FFTs is using FFTW (extremely fast, GPL licensed but a bit tricky to get a commercial license if that is unacceptable) or IPP on x86 (closed source, but works and is fast).
I'd also try looking at Facebook's Two Big Ears code for ambisonic rendering via HRTFs:
Re:Apple has copied some of the most popular apps in the App...
by shanev on Friday September 06, 2019 @02:12AM
(#20893468)
I got started by studying the C++ code in the sample app called Touch Fighter in one of the earliest iPhone SDKs. Michael Tyson's blog helped a lot too: http://atastypixel.com/blog/. This is in Swift but really good intro to audio processing on iOS: https://github.com/syedhali/AudioStreamer.
Re:Apple has copied some of the most popular apps in the App...
by cubedrone on Friday September 06, 2019 @07:28AM
(#20894678)
"The audio programming book" by MIT press is amazing, a great book that doesn't cost much. Starts with a fairly large c++ tutorial.
Re:Apple has copied some of the most popular apps in the App...
by polskibus on Friday September 06, 2019 @02:44AM
(#20893582)
Have you tried using all the value types performance magic (avoid GC, use structs, avoid copying, consider stackalloc, etc)?
Is there any "C++ for dummies with a bent for audio processing" material you'd recommend?