Paulon8080
Posts: 34
Joined: Wed Jan 04, 2017 12:15 pm

.wav duration with node.js

Mon Jan 22, 2018 10:02 pm

Hi all,

I am working on a project using node.js and .wav files with my Pi3.

I have a selection of audio .wav files (all of different lengths). I want 'X' amount of them to be selected and played one after another. I know I can use Set Interval to time them to play a certain amount of time after each other...which I've been playing around with it.

Code: Select all


setTimeout(function() {
    
audio1 () //
  },'When to start audio1 playing after audio2  )

audio 2 () //
},1000)

But I need to figure out the duration of each audio clip so that I can use setInterval to start 2 second audio file. As in if I know audio 1 is 30 seconds long I can use setinterval to start the second audio clip to play at 31 seconds.

I hope that makes sense, and suggestions, greatly appreciated etc!

Thanks,

Paul

Return to “Other programming languages”

Who is online

Users browsing this forum: No registered users and 2 guests