With the current implementation of the code, the first time you press the button, it will call playTrack(1), then next time you press the button, it will call playTrack(2) (because of how it keeps track and increments curTrack)
This doesn't make a lot of sense, because when calling playTrack(1), it will actually play BOTH tracks because of this if statement within the method:
if (track == 0)
{
// if track 1, also play track 2 in reverse
// zeros in between
for (int i = 0; i < BETWEEN_ZERO; i++)
playBit(0);
// send second track in reverse
reverseTrack(2);
}
Then after playing both tracks, next time you press the button it will call playTrack(2) which will ONLY play the 2nd track because that if statement isn't satisfied.
Essentially this means that every other time you press the button, the magspoof will ONLY play track 2. All other times it will play both tracks.