I’m working on a project where I need to record, time-scale the recorded message, play to the speakers the time-scaled signal. All in real time in a continuous loop. Latency between recording and playback needs to be less than 30ms.
Can anyone give me some tips on how to do this? I’ve been playing with the examples, and things aren’t falling together like I would like.
What I mean by time-scaling. One way to time-scale is to resample.
example1- record at 44.1kHz. Resample signal to 22.05KHz. Then play this signal AT 44.1Khz. This give a time-scaling factor of 2 (I.e. time compression).
example2 – record at 44.1kHz. DO NOT resample. Then play signal at 22.05kHz. This will give a time-scaling factor of 1/2 (I.e. time expansion).
I’m normally working with scale factors on the order of .98 to 1.02, but the examples give an idea what I need to happen. I need fine control over either the resampling rate OR the output rate.
- UmrPoolboy asked 8 years ago
well, I "think" i know what you want, but not realy sure:
You want to play a recorded signal at any sample rate right?
Dunno if this is what you are looking for, but FMOD_Channel_SetFrequency allows you to set the channels sample rate in real time.
Again, im not sure if this is what you meant, but i hope that helps.
- nci answered 8 years ago
The system needs to be real time. As in, a very low latency between the recording and the output of the time-scaled signal.
Editing first post to make this point more clear.
I’m currently using a FMOD::system to handle both the real-time recording and playback. But again, I need to either alter the sample rate on the output, or resample to a different rate but play at the same sample rate.
- UmrPoolboy answered 8 years ago
Please login first to submit.