I've got three declick positions in my code, one for volume changes, one for sample pos changes and one for pan changes. Perhaps I can optimize things there... I don't know.
Since panning is just another form of volume control, you can actually reduce the complexity of the code by just calculating the slope after calculating the total channel volume, which should include any panning.
Doesn't it sound bad when you just take the last sample value (lets say we are mixing mono) and build a slope to zero?
No, it basically sounds like "nothing", which is exactly the goal of this approach. As said this approach is just used at the end of a sample, not when cutting it. For normal volume changes it is of no use, but I can imagine that this would also work well in the case of stopped samples, because it would really stop the sample, so you can be sure that no further sample content is being played. I have never tested if it would work but it sounds plausible to me, and I think that some players actually use this approach.
And why not a linear slope?
It's not documented but I guess it's just to have a quicker decay while still not introducing any pops.