sfxmix 1.1.6 → 1.1.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Binary file
package/index.js CHANGED
@@ -134,27 +134,21 @@ class SfxMix {
134
134
 
135
135
  concatenateAudioFiles(inputFiles, outputFile) {
136
136
  return new Promise((resolve, reject) => {
137
- // Use absolute paths for input files
138
- const absoluteInputFiles = inputFiles.map(file => path.resolve(file));
137
+ // Use absolute paths for input files based on process.cwd()
138
+ const absoluteInputFiles = inputFiles.map(file => path.isAbsolute(file) ? file : path.resolve(process.cwd(), file));
139
139
  const concatList = absoluteInputFiles.map(file => `file '${file}'`).join('\n');
140
140
  const concatFile = path.join(this.TMP_DIR, `concat_${uuidv4()}.txt`);
141
141
 
142
142
  try {
143
143
  fs.writeFileSync(concatFile, concatList);
144
- // console.log(`Concat file created at: ${concatFile}`);
145
- // console.log(`Concat file contents:\n${concatList}`);
146
144
 
147
145
  ffmpeg()
148
146
  .input(concatFile)
149
147
  .inputOptions(['-f', 'concat', '-safe', '0'])
150
148
  .outputOptions(['-c', 'copy'])
151
149
  .output(outputFile)
152
- .on('start', (commandLine) => {
153
- // console.log('Spawned FFmpeg with command: ' + commandLine);
154
- })
155
150
  .on('end', () => {
156
151
  fs.unlinkSync(concatFile);
157
- // console.log(`Concatenation complete. Output file: ${outputFile}`);
158
152
  resolve();
159
153
  })
160
154
  .on('error', (err) => {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "sfxmix",
3
3
  "description": "🎧 SfxMix - Powerful and easy-to-use module for processing audio.",
4
- "version": "1.1.6",
4
+ "version": "1.1.8",
5
5
  "main": "index.js",
6
6
  "dependencies": {
7
7
  "fluent-ffmpeg": "^2.1.3",