Matrix Voice: Pop on play

Hi guys,

I have matrix audio working on my application via the HAL example, but there is a loud “pop” sound before and after playing any sample. I’ve experimented a bit and found that it is related to the play command itself:

I have this code (which plays one or more times depending on how many samples compared to the size of the matrix voice dac buffer):

int MatrixVoicePlay::playSamples(std::vector<short unsigned int> *samples) {
    int offset = 0;
    int matrix_buffer_size = (matrix_hal::kMaxWriteLength);

    for (int i=0, j=0; i < samples->size(); i++, j++){
        if (j>=matrix_buffer_size){
            offset += matrix_buffer_size;
            j = 0;
        mDac->write_data_[j] = (*samples)[i];
    return 0;

Any ideas?

Hi, didi you get this working?
I want to play audio as well, but then with the esp32