When using 'autoplay resource' you're using the sound part of XAudio2, not the music part. That has a few advantages. While playing music does not allow you to get informations about the music, you have control over sounds that are playing:
Just test the second against the first. There is only one thing to keep in mind, and that is the frames at which the game runs. If it runs with 60 fps you won't be able to catch the exact end of the song. It is better to just test if the position is greater than a certain distance from the end.
position >= length - 0.25 (or any other number that works with your framerate)
To get the channel number of the sound you can use 'Get last channel autoplayed', but it would be much easier to load the resource to a specific channel. Then use 'Set reserved' to protect this channel.
You can use an array for the file names of the wav files and a global variable that increases with every sound played and corresponds to the index of the next wav file name to load. But you would then need to load them from a folder, because if I remember right there's an issue that prevents using strings for the resources.