Arduino library for WTV020-SD-16P audio module

the-rebel-agent:
Why not use .stopVoice method?

Thank you for the reply.

I tried that too.

Even tried using pin change interrupts, thought maybe it just the delay in reading the digitalRead status for the pins.

Basically, what I wanted to achieve, is that whenever a button is pressed, it will interrupt the currently playing sound clip and play the sound clip associated with the button that was pressed (Even if it was the same button).

Here's the code I'm using:
I'm using the pinchangeint library.

/*
 Example: Control a WTV020-SD-16P module to play voices from an Arduino board.
 Created by Diego J. Arevalo, August 6th, 2012.
 Released into the public domain.
 */

#include <Wtv020sd16p.h>
#include <PinChangeInt.h>

int resetPin = 2;  // The pin number of the reset pin.
int clockPin = 3;  // The pin number of the clock pin.
int dataPin = 4;  // The pin number of the data pin.
int busyPin = 5;  // The pin number of the busy pin.

#define BUTTON01  7
#define BUTTON02  8

/*
Create an instance of the Wtv020sd16p class.
 1st parameter: Reset pin number.
 2nd parameter: Clock pin number.
 3rd parameter: Data pin number.
 4th parameter: Busy pin number.
 */

Wtv020sd16p wtv020sd16p(resetPin,clockPin,dataPin,busyPin);

void playSound01(){
  wtv020sd16p.stopVoice();
  wtv020sd16p.playVoice(0);
}

void playSound02(){
  wtv020sd16p.stopVoice();
  wtv020sd16p.playVoice(1);

void setup() {
  //Initializes the module.

  pinMode(BUTTON01, INPUT);
  digitalWrite(BUTTON01, HIGH);
  PCintPort::attachInterrupt(BUTTON01, &playSound01, RISING);
  
  pinMode(BUTTON02, INPUT);
  digitalWrite(BUTTON02, HIGH);
  PCintPort::attachInterrupt(BUTTON02, &playSound02, RISING);
  
  wtv020sd16p.reset();
}

void loop() {
 
}