rygaar
New Member
Posts: 4
Posts: 4
|
Post by rygaar on Oct 7, 2016 3:54:13 GMT
Hi,
The profiler is showing a 32 Byte allocation every time I play a sound using:
DarkTonic.MasterAudio.MasterAudio.PlaySound("Sound");
Drilling down into the profiler, the offender is:
MasterAudio.PlaySoundIfAvailable()
This adds up during gameplay. Thus can it be addressed?
thanks Liam
|
|
|
Post by DarkTonic Dev on Oct 7, 2016 5:38:35 GMT
Use MasterAudio.PlaySoundAndForget, it has zero bytes allocation. The PlaySound methods without "AndForget" return a PlaySoundResult object, which you only need to use if you want to alter something after it starts playing or do other chaining code.
|
|
rygaar
New Member
Posts: 4
Posts: 4
|
Post by rygaar on Oct 7, 2016 5:53:27 GMT
That's great. Thanks.
|
|
|
Post by DarkTonic Dev on Oct 7, 2016 5:59:51 GMT
No problem.
|
|