rorywalsh / CsoundUnity

GNU Lesser General Public License v2.1
72 stars 20 forks source link

AudioSource pitch adjusted based on Unity and Csound sr comparison #32

Closed Despair-Bear closed 2 months ago

Despair-Bear commented 2 years ago

Found that adjusting the pitch of an AudioSource reduces the rate at which OnAudioFilterRead is called. This allows for a lower sample rate to be used in the Csound instance and Unity will read from said instance at the appropriate sample rate. Allows for major improvement in resource consumption when less than high quality audio required.

Need to test this out on a more recent Unity version tomorrow, am running an older version of Unity (2019.4.9f1). Will verify all is good in more recent versions tomorrow evening.

giovannibedetti commented 2 years ago

@all-contributors add @Despair-Bear for code bug

allcontributors[bot] commented 2 years ago

@giovannibedetti

I've put up a pull request to add @Despair-Bear! :tada:

giovannibedetti commented 2 months ago

Closing this pull request as a similar functionality has been implemented in version 3.5.0.

Feel free to reopen it if you think something is missing.