Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions audiosprite.js
Original file line number Diff line number Diff line change
Expand Up @@ -160,10 +160,12 @@ module.exports = function(files) {

function exportFile(src, dest, ext, opt, store, cb) {
var outfile = dest + '.' + ext
var consoleOutput = ''
spawn('ffmpeg',['-y', '-ar', opts.samplerate, '-ac', opts.channels, '-f', 's16le', '-i', src]
.concat(opt).concat(outfile))
.on('exit', function(code, signal) {
if (code) {
opts.logger.info(consoleOutput)
return cb({
msg: 'Error exporting file',
format: ext,
Expand All @@ -187,6 +189,9 @@ module.exports = function(files) {
cb()
}
})
.stderr.on('data', function(data) {
consoleOutput += data
})
}

function exportFileCaf(src, dest, cb) {
Expand Down