Skip to content

Commit

Permalink
Fix Linux Paulstretch regression
Browse files Browse the repository at this point in the history
  • Loading branch information
L3337 committed May 16, 2023
1 parent 50da9d8 commit 7ec1f72
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 7 deletions.
9 changes: 6 additions & 3 deletions src/sg_py_vendor/wavefile/libsndfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@
import ctypes as ct
import numpy as np

IS_WINDOWS = "win32" in sys.platform or "msys" in sys.platform

if sys.platform == "win32":
dllName = 'libsndfile-1'
elif "linux" in sys.platform:
Expand Down Expand Up @@ -320,9 +322,10 @@ def __init_lib_methods():
_lib.sf_open.restype = SNDFILE
_lib.sf_open.argtypes = [ct.c_char_p, ct.c_int, ct.POINTER(SF_INFO)]

#SNDFILE* sf_wchar_open (LPCWSTR wpath, int mode, SF_INFO *sfinfo);
_lib.sf_wchar_open.restype = SNDFILE
_lib.sf_wchar_open.argtypes = [ct.c_wchar_p, ct.c_int, ct.POINTER(SF_INFO)]
if IS_WINDOWS:
#SNDFILE* sf_wchar_open (LPCWSTR wpath, int mode, SF_INFO *sfinfo);
_lib.sf_wchar_open.restype = SNDFILE
_lib.sf_wchar_open.argtypes = [ct.c_wchar_p, ct.c_int, ct.POINTER(SF_INFO)]

#int sf_error (SNDFILE *sndfile) ;
_lib.sf_error.restype = ct.c_int
Expand Down
10 changes: 7 additions & 3 deletions src/sg_py_vendor/wavefile/wavefile.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,13 @@

from .libsndfile import _lib

from .libsndfile import OPEN_MODES, SEEK_MODES, SF_INFO, FILE_STRINGS

IS_WINDOWS = "win32" in sys.platform or "msys" in sys.platform
from .libsndfile import (
FILE_STRINGS,
IS_WINDOWS,
OPEN_MODES,
SEEK_MODES,
SF_INFO,
)

# Vorbis and Flac use utf8.
# WAV/AIFF use ascii, but if chars beyond 127 are found,
Expand Down
3 changes: 2 additions & 1 deletion src/sgui/daw/sequencer/audio_input.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,8 @@ def __init__(self, a_num, a_layout, a_callback, a_count):
self.stereo_combobox = QComboBox()
self.stereo_combobox.setToolTip(
"Select another input channel to pair as a stereo channel "
"to this channel"
"to this channel. Note that the other channel does not need to "
"be record-armed, doing so will record it separately"
)
a_layout.addWidget(self.stereo_combobox, a_num, 3)
self.stereo_combobox.setMinimumWidth(75)
Expand Down

0 comments on commit 7ec1f72

Please sign in to comment.