Add sox io.

pull/1790/head
KP 3 years ago
parent 86ac7b80ee
commit eead92af06

@ -25,7 +25,8 @@ auto get_info_file(const std::string &path, const std::string &format)
SoxFormat sf(sox_open_read(path.data(),
/*signal=*/nullptr,
/*encoding=*/nullptr,
/*filetype=*/format.data()));
/*filetype=*/format.empty() ? nullptr : format.data()));
validate_input_file(sf, path);
@ -54,7 +55,7 @@ auto get_info_fileobj(py::object fileobj, const std::string &format)
SoxFormat sf(sox_open_mem_read(buf, buf_size,
/*signal=*/nullptr,
/*encoding=*/nullptr,
/*filetype=*/format.data()));
/*filetype=*/format.empty() ? nullptr : format.data()));
// In case of streamed data, length can be 0
validate_input_memfile(sf);

@ -19,7 +19,6 @@ import pybind11
import setuptools
from setuptools import Extension
from setuptools.command.build_ext import build_ext
from setuptools.command.install import install
from setuptools.command.test import test
# set the version here
@ -47,11 +46,6 @@ class TestCommand(test):
os.system(f'pytest {benchmark_item}')
class InstallCommand(install):
def run(self):
install.run(self)
class ExtBuildCommand(build_ext):
def run(self):
try:
@ -149,7 +143,6 @@ setuptools.setup(
},
ext_modules=get_ext_modules(),
cmdclass={
'install': InstallCommand,
"build_ext": ExtBuildCommand,
'test': TestCommand,
}, )

Loading…
Cancel
Save