0

I'm currently writing a real time audio application in C++ that takes in a depth sensor input and converts it to MIDI signals. It has to model 3D space and respond in real time to the movement of an object in 3D space monitored by the depth sensors.

I want to re-write this application in C# because I find C++ clunky and slow to develop with while I find C# a pleasure to write. My concern is that the garbage collector will cause random slow downs that could result in unacceptable latency. The application could take a 20% performance hit overall but it needs to be consistent. It can't spike to 200% slowdown once then have 10% slowdown the rest of the time to average to 20% it would need to be steady.

An added latency of say 50ms at any one time would be enough to make it sound off.

Is it viable to do this in C#?

koreus737
  • 661
  • 3
  • 9
  • 18

1 Answers1

0

It is easy to write the code which will be very slow also in assembler Please demonstrate some peace of code where you think it is slow down otherwise I don't know what to answer to this question. Some answer. Yes garbig collection can slow down your program, but you can control that.