sound_generator
sound_generator copied to clipboard
How often can the frequency be updated per second?
I have been experimenting with using the sound generator to tonally represent G-forces using the userAccelerometer from the motion_sensors package. Through these experiments, I have noticed that the sound generator does not update the frequency of the wave more than about 5 times a second (5hz).
Is it possible to increase this update rate? Ideally, I would like an update rate of about 30hz.
I apologize if this is the wrong place for this question. If so, please point me to the right place.
Take a look at the AudioTrack.Builder. I changed the SoundGenerator a little bit and now have an instantly changing sound generator: https://github.com/si-gr/sound_generator/commit/beab4ec9b972ba18da14cde82d952a6a864db2f5