Skip to content

Commit

Permalink
Fix undefined variable when naming recording file
Browse files Browse the repository at this point in the history
  • Loading branch information
GodCed committed Jun 11, 2019
1 parent cccb315 commit 66fda0d
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions audio-recorder.js
Original file line number Diff line number Diff line change
Expand Up @@ -111,20 +111,20 @@ exports.AudioRecorder = class AudioRecorder extends EventEmitter {
console.log(`Recorder ${this.index} started`)
console.log(`Recorder ${this.index} was ${this.active} active`)

now = new Date()
let now = new Date()

dateString = ""
let dateString = ""
dateString += now.getFullYear() + "-"
dateString += (now.getMonth()+1) + "-"
dateString += now.getDate()

timeString = ""
let timeString = ""
timeString += now.getHours() + "-"
timeString += now.getMinutes() + "-"
timeString += now.getSeconds() + "-"
timeString += now.getMilliseconds()

datetimeString = dateString + "_" + timeString
let datetimeString = dateString + "_" + timeString

let filename = path.join(this.workspacePath, `ODAS_${id}_${datetimeString}_${this.suffix}.wav`)
this.path = filename
Expand Down

0 comments on commit 66fda0d

Please sign in to comment.