Please can you test this code and see if you can see where I've gone wrong, thanks!
Basically at loop iteration 4096 when 4095 channels have been allocated and supposedly freed with StopChannel() it bombs with "attempt to access field or method of null object) on the StopChannel line. This is because the channel is null because AllocChannel starts returning null after channel 4096.
The limit is not the issue here, that's fine, the issue is why aren't they freeing up?
I'm running 1.24. Syncmoded a few months back (after Mark's new DX7 rewrite) but not since.
This has probably meant that my games bombs if you play them long enough. :-(
Basically at loop iteration 4096 when 4095 channels have been allocated and supposedly freed with StopChannel() it bombs with "attempt to access field or method of null object) on the StopChannel line. This is because the channel is null because AllocChannel starts returning null after channel 4096.
The limit is not the issue here, that's fine, the issue is why aren't they freeing up?
I'm running 1.24. Syncmoded a few months back (after Mark's new DX7 rewrite) but not since.
For Local i=1 To 5000 Local c:TChannel = AllocChannel() StopChannel(c) c=null GCCollect 'safety Print i Next
This has probably meant that my games bombs if you play them long enough. :-(