Fix the Mixer issues reported by degasus * Swap and exchange samples in the audio thread instead of the CPU thread. * Move static variables to class instance variables. * Pad incomplete buffers by repeating the last value instead of 0.