I'm trying to make a music making program and used PyDub for playing sounds as I could change the pitch. However, it opens a window whenever playing a sound. No matter what I do, it will open a window.
I have tried using
startupinfo = subprocess.STARTUPINFO
startupinfo.dwFlags |= subprocess._subprocess.STARTF_USESHOWWINDOW
startupinfo.wShowWindow = subprocess._subprocess.SW_HIDE
behind every
p = subprocess.Popen(conversion_command, stdin=devnull, stdout=subprocess.PIPE, stderr=subprocess.PIPE, startupinfo=startupinfo)
but to no avail. I have also tried putting creationflags=0x08000000
in the
p = subprocess.Popen(conversion_command, stdin=devnull, stdout=subprocess.PIPE, stderr=subprocess.PIPE, startupinfo=startupinfo)
which also does not work.
Edit: I found another post which set default creationflags to 0x08000000, which worked!