Skip to content
This repository was archived by the owner on Feb 17, 2022. It is now read-only.
Open
Show file tree
Hide file tree
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
4 changes: 2 additions & 2 deletions pysndfx/dsp.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import shlex
from io import BufferedReader, BufferedWriter
from subprocess import PIPE, Popen

import platform
import numpy as np

from .sndfiles import (
Expand Down Expand Up @@ -523,7 +523,7 @@ def __call__(
infile.cmd_prefix if infile is not None else '-d',
outfile.cmd_suffix if outfile is not None else '-d',
] + list(map(str, self.command))),
posix=False,
posix=(True if (platform.system() == 'Windows') else False),
)

logger.debug("Running command : %s" % cmd)
Expand Down
4 changes: 2 additions & 2 deletions pysndfx/sndfiles.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import shlex
import wave
from subprocess import PIPE, Popen

import platform
import numpy as np

ENCODINGS_MAPPING = {
Expand All @@ -28,7 +28,7 @@ def __init__(self, filepath):
super(FilePathInput, self).__init__()
info_cmd = 'sox --i -c ' + filepath
logger.debug("Running info command : %s" % info_cmd)
stdout, stderr = Popen(shlex.split(info_cmd, posix=False), stdout=PIPE, stderr=PIPE).communicate()
stdout, stderr = Popen(shlex.split(info_cmd, posix=(True if (platform.system() == 'Windows') else False)), stdout=PIPE, stderr=PIPE).communicate()
self.channels = int(stdout)
self.cmd_prefix = filepath

Expand Down