Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Windows Support #4

Open
ssfrr opened this issue Jan 6, 2014 · 19 comments
Open

Windows Support #4

ssfrr opened this issue Jan 6, 2014 · 19 comments

Comments

@ssfrr
Copy link
Owner

ssfrr commented Jan 6, 2014

Pretty much the only thing that should need to be fixed to work in windows is the synchronization between the Julia task and the C PortAudio callback. Currently we're using a POSIX semaphore and a file descriptor. I'm not sure what the best windows equivalents are.

-s

@vtjnash
Copy link

vtjnash commented Sep 4, 2014

looks like you've removed the requirement for this?

it also would be nice to hook up BinDeps support, esp. since both portaudio and libsndfile are already available via WinRPM

@ssfrr
Copy link
Owner Author

ssfrr commented Sep 4, 2014

which change are you referring to? I've got the issue up but windows support hasn't been a priority.

I was avoiding Windows support because of the custom C shim and multithreading gymnastics I was doing before, but now that those are gone it should be pretty easy.

I just added the WinRPM lines to REQUIRE and build.jl, though I had to guess at the package names. Is there a list of WinRPM packages online somewhere?

@ssfrr
Copy link
Owner Author

ssfrr commented Oct 26, 2014

Via email Aitor Ortiz de Latierro Olivella informed me that the packages are:

  • "libportaudio2" (libportaudio2 (mingw64) - Portable Real-Time Audio Library)
  • "libsndfile1" (libsndfile1 (mingw64) - A Library to Handle Various Audio File Formats)

I changed the names in the package script, hopefully that helps. If anyone can test on Windows please let me know.

@aiorla
Copy link

aiorla commented Oct 26, 2014

Now this message appears just after the "INFO: Complete" of the libportaudio2 installation.

===============================[ ERROR: AudioIO ]===============================

Provider PackageManager failed to satisfy dependency libportaudio
while loading C:\Users\Aitor.julia\v0.3\AudioIO\deps\build.jl, in expression st
arting on line 29

================================[ BUILD ERRORS ]================================

WARNING: AudioIO had build errors.

  • packages with build errors remain installed in C:\Users\Aitor.julia\v0.3
  • build a package and all its dependencies with Pkg.build(pkg)
  • build a single package by running its deps/build.jl script

@ssfrr
Copy link
Owner Author

ssfrr commented Oct 26, 2014

Hmm, what happens if you try to use AudioIO even though the build throws the error? Are you able to play sound?

@aiorla
Copy link

aiorla commented Oct 26, 2014

With just "using AudioIO":

ERROR: could not open file C:\Users\Aitor.julia\v0.3\AudioIO\src../deps/deps.j
l
in include at boot.jl:245
in include_from_node1 at loading.jl:128
in include at boot.jl:245
in include_from_node1 at loading.jl:128
in reload_path at loading.jl:152
in _require at loading.jl:67
in require at loading.jl:51
while loading C:\Users\Aitor.julia\v0.3\AudioIO\src\AudioIO.jl, in expression s
tarting on line 60

@aiorla
Copy link

aiorla commented Oct 26, 2014

I've manually installed "libsndfile1" and the error in the "using AudioIO" doesn't appear. (it is not installed in the build process because of the error)
Now I'm going to try play, I will update this comment with the results shortly. (10 min)

UPDATE: Every method like play, ArrayPlayer, SinOsc, read "is not defined" :(
UPDATE2: On the other hand methods like "AudioIO.open(wavFile)" work.

@ssfrr
Copy link
Owner Author

ssfrr commented Nov 12, 2014

Hi, sorry, I didn't see these updates because apparently GitHub doesn't sent notifications on updates, only new comments.

I'll see if I can get AudioIO up and running on a Windows machine myself so I can better debug. I'll comment back when I have some more info. Probably next week.

@wielrenner
Copy link

Still getting the same error on my Windows 10 machine with Julia 0.3.11 when building AudioIO:

===============================[ ERROR: AudioIO ]===============================

Provider PackageManager failed to satisfy dependency libportaudio
while loading C:\Users\Wouter.julia\v0.3\AudioIO\deps\build.jl, in expression s
tarting on line 29

================================[ BUILD ERRORS ]================================

WARNING: AudioIO had build errors.

  • packages with build errors remain installed in C:\Users\Wouter.julia\v0.3
  • build the package(s) and all dependencies with Pkg.build("AudioIO")
  • build a single package by running its deps/build.jl script

@rennis250
Copy link

I've also been finding this error. Any guesses on what one should do?

@ssfrr
Copy link
Owner Author

ssfrr commented Oct 13, 2015

Are you running the release version or master? If you're not running the latest master try checking it out with Pkg.checkout("AudioIO"). I fixed the package names to what hopefully are the correct ones, but that hasn't made it into a release yet because I haven't tested it.

@wherrera10
Copy link

It seems that the RPM provider of libportaudio2 does not provide what AudioIO wants? Or is the build script in error somehow?

According to the RPM page at http://rpmfind.net//linux/RPM/opensuse/12.1/i586/portaudio-19-273.1.3.i586.html the RPM provides:

portaudio
libportaudio.so.2
portaudio(x86-32)

Is this what AudioIO needs? Or should a different RPM be used?

@wherrera10
Copy link

Ah, here it is: for Windows to build, there have to be aliases. In build.jl the lines need to change to:

libportaudio = library_dependency("libportaudio", aliases=["libportaudio-2"])
libsndfile = library_dependency("libsndfile", aliases=["libsndfile-1"])

@rennis250
Copy link

Great! Thanks for that. Will test soon.

@ssfrr
Copy link
Owner Author

ssfrr commented Nov 3, 2015

Thanks for the windows help, @wherrera10. If this change is confirmed working than I'll merge in #50. (I don't think it should break anything on linux or osx and seems a strict improvement on windows).

Thanks!

Also, so you know, AudioIO.jl is going to be deprecated relatively soon and the functionality broken out into separate packages for audio file I/O, device I/O, and building DSP graphs. (see #48 with some more info) Changes like this will definitely make it into the new packages though, so it's definitely still helpful.

@wherrera10
Copy link

Thanks. I have an interest in device IO with DSP.

I have recently patched portaudio.jl by adding functionality to use other
than the default stream. Is the portaudio side already undergoing a lot of
revision, so my added functions are not needed?

--Bill

On Tue, Nov 3, 2015 at 9:34 AM, Spencer Russell notifications@github.com
wrote:

Thanks for the windows help, @wherrera10 https://github.com/wherrera10.
If this change is confirmed working than I'll merge in #50
#50. (I don't think it should
break anything on linux or osx and seems a strict improvement on windows).

Thanks!

Also, so you know, AudioIO.jl is going to be deprecated relatively soon
and the functionality broken out into separate packages for audio file I/O,
device I/O, and building DSP graphs. (see #48
#48 with some more info)
Changes like this will definitely make it into the new packages though, so
it's definitely still helpful.


Reply to this email directly or view it on GitHub
#4 (comment).

@ssfrr
Copy link
Owner Author

ssfrr commented Nov 3, 2015

There is going to be a lot of revision on the PortAudio side, but it's hard to tell at this point what exactly will be preserved across the transition. Certainly being able to select non-default audio streams would be a great feature to carry over, so I'd welcome the PR.

@arnfaldur
Copy link

I was wresting with this error on win64 for a while. Strangely enough I had added the @windows_only directive and the library_dependency aliases which didn't do the trick for me. The recent @windows_only change in master and the two lines proposed by @wherrera10 work as expected.

@hiccup7
Copy link

hiccup7 commented Dec 4, 2016

I wanted to offer some Windows DLLs for PortAudio that may be helpful. These are from the Python community, but I suspect these DLLs could work for Julia. Especially important to me is that these builds support WASAPI exclusive mode, and they use a recent version of PortAudio where WASAPI exclusive mode is working. Note that Python wheel files are ZIP format, so I use 7-Zip to extract DLLs from them.

These wheel files contain portaudio_x64.dll (and whatever the name is for 32-bit) compiled with the Microsoft compiler:
http://www.lfd.uci.edu/~gohlke/pythonlibs/#sounddevice

The Microsoft compiler version used for each Python version is documented at https://wiki.python.org/moin/WindowsCompilers

These DLLs are built with GCC on Linux:
https://github.com/spatialaudio/portaudio-binaries/tree/19.6.0-windows

I have tested the above DLLs on 64-bit Python 3.5 with Windows 8.1.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

8 participants