- Home /
Any ways to optimize an audio clip in code ?
Hello all I am working on a project where our user records an audio clip using the microphone of their mobile device and then can save the audioclip and re-load it to listen to it later . Currently the way I was steered to do it is converting our audioclip to a byte array , converting that byte array to a hexadecimal string and doing the reverse to re-load the data . This clip can last anywhere from 1 second to 90 seconds .
This method works currently and after a lot of re-working our save system saves and loads in a pretty decent time ( largest saves load in 15 seconds )
the issue i currently have is that after loading and saving this data multiples times in a single playthrough it completely destroys my projects frame rate .
Initially it runs at a steady 40 FPS but once the user has tried to load or save one too many times the frame rate is reduced to 4 -7 FPS .
anyway I say all this to ask the most efficient way to optimize the audio clip ? any method will be helpful I have tried to figure out if there are ways to modify compression settings in code and have found nothing of use so far .
Your answer