EDIT: Looks like the MAX98357b supports left justified mode.
Well, yes ... but the breakout board from Adafruit is unfortunately the 'A' version ... and I have it ...https://developer.mbed.org/users/Plugo/ ... -adafruit/
Ok, let's delay the problem for some years ..
You could loose 1 bit of resolution if you just shift the words 1 bit.
Now you output that in the SPI. The first 0 during the first clock cycle is discarded, next the MAX will take all other 15 bits and take them as the MSB of that word, but is still waiting for 1 BIT right?
Timer overflows, and the SPI sends the next 16bits, with the MSB set as 0 again. The MAX will take that first bit to complete the word for the other channel, and then take the next 15 for the current one.
That goes on and on until you stop playing.
So you actually lose the LSB, because it will be filled with the 1st bit sent out for the next word.
I know my explanation is completely clear, but look at figure 6 in the max98357a datasheet, and then imagine D15 was actually sent be the SPI as the second bit in the transfer. So if you shift every word by one, they will all fit in.
MSB ------------- LSB
Shift it right:
0111111111111111 (LSB bit is lost)
If you put keep sending your data shifted 1 bit, you would get something like this right?
0111111111111111 0111111111111111 0111111111111111 0111111111111111....
Now, because the DAC actually expects the first bit in the 2nd clock, and the last bit in the first clock after the LRClk togles, the DAC will take them as this:
0 - 111111111111111 0 -1111111111111110 - 1111111111111110 - 1111111111111110....
0(lost) - word 1 - word2 - word 3 - word 4
So effectively you just made a 0 in the LSB. You get 15 bits of resolution out of 16
Or you can just order an RCT board from ebay or aliexpress