Forum Rule: Always post complete source code & details to reproduce any issue!
Results 1 to 2 of 2

Thread: AudioPlaySdWav delay

  1. #1
    Junior Member
    Join Date
    Dec 2015
    Posts
    5

    AudioPlaySdWav delay

    Hi all,

    Suppose I want to simultaneously play 4 WAV files.

    When using AudioPlaySdWav:lay is it necessary to add a delay between each call? Or can I call play and then delay?

    For example would loop be ok? (I don't currently have hardware to test with)

    Code:
    void loop() {
    
       /////////////
       // Code here to check if buttons are pressed
       /////////////
    
      if (button1_pressed) {
        playSdWav1.play("SDTEST1.WAV");
      }
      if (button2_pressed) {
        playSdWav2.play("SDTEST2.WAV");
      }
      if (button2_pressed) {
        playSdWav3.play("SDTEST3.WAV");
      }
      if (button2_pressed) {
        playSdWav4.play("SDTEST4.WAV");
      }
    
      delay(5)
    
    }

  2. #2
    You shouldn't need the delay. Get some hardware and experiment.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •