at master 2.6 kB view raw
1diff --git a/nextcord/opus.py b/nextcord/opus.py 2index b1119a8e..b7c9c713 100644 3--- a/nextcord/opus.py 4+++ b/nextcord/opus.py 5@@ -233,7 +233,7 @@ def _load_default() -> bool: 6 _filename = os.path.join(_basedir, "bin", f"libopus-0.{_target}.dll") 7 _lib = libopus_loader(_filename) 8 else: 9- opus = ctypes.util.find_library("opus") 10+ opus = "@libopus@" 11 12 if opus is None: 13 _lib = None 14diff --git a/nextcord/player.py b/nextcord/player.py 15index 5c7daf52..48a11eb7 100644 16--- a/nextcord/player.py 17+++ b/nextcord/player.py 18@@ -127,7 +127,7 @@ class FFmpegAudio(AudioSource): 19 self, 20 source: Union[str, io.BufferedIOBase], 21 *, 22- executable: str = "ffmpeg", 23+ executable: str = "@ffmpeg@", 24 args: Any, 25 **subprocess_kwargs: Any, 26 ) -> None: 27@@ -254,7 +254,7 @@ class FFmpegPCMAudio(FFmpegAudio): 28 self, 29 source: Union[str, io.BufferedIOBase], 30 *, 31- executable: str = "ffmpeg", 32+ executable: str = "@ffmpeg@", 33 pipe: bool = False, 34 stderr: Optional[IO[str]] = None, 35 before_options: Optional[str] = None, 36@@ -357,7 +357,7 @@ class FFmpegOpusAudio(FFmpegAudio): 37 *, 38 bitrate: int = 128, 39 codec: Optional[str] = None, 40- executable: str = "ffmpeg", 41+ executable: str = "@ffmpeg@", 42 pipe: bool = False, 43 stderr=None, 44 before_options=None, 45@@ -510,7 +510,7 @@ class FFmpegOpusAudio(FFmpegAudio): 46 """ 47 48 method = method or "native" 49- executable = executable or "ffmpeg" 50+ executable = executable or "@ffmpeg@" 51 probefunc = fallback = None 52 53 if isinstance(method, str): 54@@ -555,9 +555,9 @@ class FFmpegOpusAudio(FFmpegAudio): 55 56 @staticmethod 57 def _probe_codec_native( 58- source, executable: str = "ffmpeg" 59+ source, executable: str = "@ffmpeg@" 60 ) -> Tuple[Optional[str], Optional[int]]: 61- exe = executable[:2] + "probe" if executable in ("ffmpeg", "avconv") else executable 62+ exe = executable[:-4] + "probe" if executable.endswith(("ffmpeg", "avconv")) else executable 63 args = [ 64 exe, 65 "-v", 66@@ -584,7 +584,7 @@ class FFmpegOpusAudio(FFmpegAudio): 67 68 @staticmethod 69 def _probe_codec_fallback( 70- source, executable: str = "ffmpeg" 71+ source, executable: str = "@ffmpeg@" 72 ) -> Tuple[Optional[str], Optional[int]]: 73 args = [executable, "-hide_banner", "-i", source] 74 proc = subprocess.Popen(