Discussion:
Portaudio on Windows 10 with MSYS2
(too old to reply)
Devin Butterfield
2018-09-06 05:07:48 UTC
Permalink
Hello,

I am trying to get portaudio working on windows 10 using Msys2 but running into a problem.

Msys2 version: msys2-i686-20180531 downloaded from msys2.org. After install, I used pacman to install gcc, automake, autoconf, etc.

Portaudio version: pa_stable_v190600_20161030.tgz

I followed the instructions here: https://app.assembla.com/spaces/portaudio/wiki/Notes_about_building_PortAudio_with_MinGW

Everything builds cleanly. However when I run the paex_sine.exe example I get this:

$ ./bin/paex_sine.exe
PortAudio Test: output sine wave. SR = 44100, BufSize = 64
Expression 'ioctl( stream->playback->fd, SNDCTL_DSP_SETTRIGGER, &enableBits )' failed in 'src/hostapi/oss/pa_unix_oss.c', line: 1471
Expression 'PaOssStream_Prepare( stream )' failed in 'src/hostapi/oss/pa_unix_oss.c', line: 1626
Stream Completed: No Message

And running pa_devs give this:

$ ./pa_devs.exe
PortAudio version: 0x00130600
Number of devices = 1
--------------------------------------- device #0
[ Default Input, Default Output ]
Name = /dev/dsp
Host API = OSS
Max inputs = 2, Max outputs = 2
Default low input latency = 0.0087
Default low output latency = 0.0087
Default high input latency = 0.0348
Default high output latency = 0.0348
Default sample rate = 44100.00
Supported standard sample rates
for half-duplex 16 bit 2 channel input =
8000.00, 9600.00, 11025.00, 12000.00,
16000.00, 22050.00, 24000.00, 32000.00,
44100.00, 48000.00, 88200.00, 96000.00,
192000.00
Supported standard sample rates
for half-duplex 16 bit 2 channel output =
8000.00, 9600.00, 11025.00, 12000.00,
16000.00, 22050.00, 24000.00, 32000.00,
44100.00, 48000.00, 88200.00, 96000.00,
192000.00
Supported standard sample rates
for full-duplex 16 bit 2 channel input, 2 channel output =
8000.00, 9600.00, 11025.00, 12000.00,
16000.00, 22050.00, 24000.00, 32000.00,
44100.00, 48000.00, 88200.00, 96000.00,
192000.00
----------------------------------------------


So I tried building by configuring explicitly for windows with —with-winapi=wmme —without-oss but then I get this:

***@DBWV MSYS /z/Projects/hamradio/hf_modem/hecate_modem/portaudio
$ ./bin/paex_sine.exe
PortAudio Test: output sine wave. SR = 44100, BufSize = 64
Error: No default output device.
An error occured while using the portaudio stream
Error number: 0
Error message: Success

***@DBWV MSYS /z/Projects/hamradio/hf_modem/hecate_modem/portaudio
$ ./bin/pa_devs.exe
PortAudio version: 0x00130600
Number of devices = 0


So, any ideas what I am missing here?

Thanks.

Regards, Devin
Alberto di Bene
2018-09-06 08:28:26 UTC
Permalink
Post by Devin Butterfield
$ ./bin/paex_sine.exe
PortAudio Test: output sine wave. SR = 44100, BufSize = 64
Error:_*No default output device*_.
Just a shot in the dark... did you have something plugged into the Line-Out jack of the sound card ?
If the jack is empty, Windows 10 is not aware of the existence of that output device...

73  Alberto  I2PHD
Gisle Vanem
2018-09-06 09:36:08 UTC
Permalink
Post by Devin Butterfield
I am trying to get portaudio working on windows 10 using Msys2 but running into a problem.
$ ./bin/paex_sine.exe
PortAudio Test: output sine wave. SR = 44100, BufSize = 64
Expression 'ioctl( stream->playback->fd, SNDCTL_DSP_SETTRIGGER, &enableBits )' failed in 'src/hostapi/oss/pa_unix_oss.c', line: 1471
Expression 'PaOssStream_Prepare( stream )' failed in 'src/hostapi/oss/pa_unix_oss.c', line: 1626
Stream Completed: No Message
Compiling 'pa_unix_oss.c' for Win-10! How did that happen?
That will never work.
Post by Devin Butterfield
$ ./bin/paex_sine.exe
PortAudio Test: output sine wave. SR = 44100, BufSize = 64
Error: No default output device.
An error occured while using the portaudio stream
Error number: 0
Error message: Success
Windows will work with at least one of these:
ASIO, DSOUND (DirectX), WASAPI, WDMKS and/or WMME.

I assume the command would be:
configure --with-winapi=wmme,directx,asio,wasapi,wdmks

Not sure since I do not use autotools on Windows, but
refer 'sh configure --help'
--
--gv
Loading...