Discussion:
Compile Pa_fuzz with emscripten
(too old to reply)
Darwin Sese
2018-09-06 08:56:52 UTC
Permalink
Hi folks

i tried to compile pa_fuzz.c with emscripten. but i got this error

warning: unresolved symbol: Pa_CloseStream
warning: unresolved symbol: Pa_GetDefaultOutputDevice
warning: unresolved symbol: Pa_GetErrorText
warning: unresolved symbol: Pa_GetLastHostErrorInfo
warning: unresolved symbol: Pa_Initialize
warning: unresolved symbol: Pa_OpenStream
warning: unresolved symbol: Pa_Sleep
warning: unresolved symbol: Pa_StartStream
warning: unresolved symbol: Pa_StopStream
warning: unresolved symbol: Pa_Terminate
warning: unresolved symbol: Pa_WriteStream

any idea?

Thanks!
--
Darwin Sese
<http://www.earnmailer.com/link/14976efb59a73c20>

<http://www.earnmailer.com/alert/confirm/14976efb59a73c20>
<http://www.earnmailer.com/>
Phil Burk
2018-09-08 22:52:36 UTC
Permalink
Those are all the PortAudio functions that pa_fuzz.c.
I don't know what emscriptem is but I suspect you need to tell it where the
PortAudio library is.
Phil Burk
Post by Darwin Sese
Hi folks
i tried to compile pa_fuzz.c with emscripten. but i got this error
warning: unresolved symbol: Pa_CloseStream
warning: unresolved symbol: Pa_GetDefaultOutputDevice
warning: unresolved symbol: Pa_GetErrorText
warning: unresolved symbol: Pa_GetLastHostErrorInfo
warning: unresolved symbol: Pa_Initialize
warning: unresolved symbol: Pa_OpenStream
warning: unresolved symbol: Pa_Sleep
warning: unresolved symbol: Pa_StartStream
warning: unresolved symbol: Pa_StopStream
warning: unresolved symbol: Pa_Terminate
warning: unresolved symbol: Pa_WriteStream
any idea?
Thanks!
--
Darwin Sese
<http://www.earnmailer.com/link/14976efb59a73c20>
<http://www.earnmailer.com/alert/confirm/14976efb59a73c20>
<http://www.earnmailer.com/>
_______________________________________________
Portaudio mailing list
https://lists.columbia.edu/mailman/listinfo/portaudio
Darwin Sese
2018-09-09 14:30:14 UTC
Permalink
hi phil, emscripten doing is converting c/c++ code to javascript. So
portaudio will run to the browser
Post by Phil Burk
Those are all the PortAudio functions that pa_fuzz.c.
I don't know what emscriptem is but I suspect you need to tell it where
the PortAudio library is.
Phil Burk
Post by Darwin Sese
Hi folks
i tried to compile pa_fuzz.c with emscripten. but i got this error
warning: unresolved symbol: Pa_CloseStream
warning: unresolved symbol: Pa_GetDefaultOutputDevice
warning: unresolved symbol: Pa_GetErrorText
warning: unresolved symbol: Pa_GetLastHostErrorInfo
warning: unresolved symbol: Pa_Initialize
warning: unresolved symbol: Pa_OpenStream
warning: unresolved symbol: Pa_Sleep
warning: unresolved symbol: Pa_StartStream
warning: unresolved symbol: Pa_StopStream
warning: unresolved symbol: Pa_Terminate
warning: unresolved symbol: Pa_WriteStream
any idea?
Thanks!
--
Darwin Sese
<http://www.earnmailer.com/link/14976efb59a73c20>
<http://www.earnmailer.com/alert/confirm/14976efb59a73c20>
<http://www.earnmailer.com/>
_______________________________________________
Portaudio mailing list
https://lists.columbia.edu/mailman/listinfo/portaudio
--
Darwin Sese
<http://www.earnmailer.com/link/14976efb59a73c20>

<http://www.earnmailer.com/alert/confirm/14976efb59a73c20>
<http://www.earnmailer.com/>
Neil C Smith
2018-09-09 15:16:41 UTC
Permalink
Post by Darwin Sese
hi phil, emscripten doing is converting c/c++ code to javascript. So
portaudio will run to the browser
Wouldn't you also need to write a WebAudio implementation of PortAudio for
that, similar to what CSound, Faust, etc. are doing?

Best wishes,

Neil
Darwin Sese
2018-09-09 16:03:57 UTC
Permalink
Emscripten automatically generate the code for that. I am thinking why it
does not compiled since i added the library into its command.
Post by Neil C Smith
Post by Darwin Sese
hi phil, emscripten doing is converting c/c++ code to javascript. So
portaudio will run to the browser
Wouldn't you also need to write a WebAudio implementation of PortAudio for
that, similar to what CSound, Faust, etc. are doing?
Best wishes,
Neil
Post by Darwin Sese
_______________________________________________
Portaudio mailing list
https://lists.columbia.edu/mailman/listinfo/portaudio
Phil Burk
2018-09-09 16:15:43 UTC
Permalink
Hello Darwin,

Javascript in the browser cannot call native C libraries, for example
PortAudio, because that would be a security risk.
You could convert PortAudio to Javascript but it needs to call native host
APIs like ALSA or CoreAudio.
So I don't think this approach will work.

If you have a lot of DSP code in C then you could convert it to asm.js
using Emscriptem. But for the audio I/O I think you will need to use the
existing WebAudio interface. It is portable across multiple platforms. So
you don't really need PortAudio for JavaScript.

Here are some WebAudio links:
http://www.softsynth.com/links/webaudio.php

Phil Burk
Post by Darwin Sese
hi phil, emscripten doing is converting c/c++ code to javascript. So
portaudio will run to the browser
Post by Phil Burk
Those are all the PortAudio functions that pa_fuzz.c.
I don't know what emscriptem is but I suspect you need to tell it where
the PortAudio library is.
Phil Burk
Post by Darwin Sese
Hi folks
i tried to compile pa_fuzz.c with emscripten. but i got this error
warning: unresolved symbol: Pa_CloseStream
warning: unresolved symbol: Pa_GetDefaultOutputDevice
warning: unresolved symbol: Pa_GetErrorText
warning: unresolved symbol: Pa_GetLastHostErrorInfo
warning: unresolved symbol: Pa_Initialize
warning: unresolved symbol: Pa_OpenStream
warning: unresolved symbol: Pa_Sleep
warning: unresolved symbol: Pa_StartStream
warning: unresolved symbol: Pa_StopStream
warning: unresolved symbol: Pa_Terminate
warning: unresolved symbol: Pa_WriteStream
any idea?
Thanks!
--
Darwin Sese
<http://www.earnmailer.com/link/14976efb59a73c20>
<http://www.earnmailer.com/alert/confirm/14976efb59a73c20>
<http://www.earnmailer.com/>
_______________________________________________
Portaudio mailing list
https://lists.columbia.edu/mailman/listinfo/portaudio
--
Darwin Sese
<http://www.earnmailer.com/link/14976efb59a73c20>
<http://www.earnmailer.com/alert/confirm/14976efb59a73c20>
<http://www.earnmailer.com/>
Raphaël Dingé
2018-09-09 18:00:49 UTC
Permalink
Hi Darwin,

Another solution that might work for you might be to use OpenAL as
emscripten already generates the bindings for you (and the latter actually
uses the WebAudio API as a backend)

You will find more informations here:
https://kripken.github.io/emscripten-site/docs/porting/Audio.html

Thanks,

Raphael
Post by Phil Burk
Hello Darwin,
Javascript in the browser cannot call native C libraries, for example
PortAudio, because that would be a security risk.
You could convert PortAudio to Javascript but it needs to call native host
APIs like ALSA or CoreAudio.
So I don't think this approach will work.
If you have a lot of DSP code in C then you could convert it to asm.js
using Emscriptem. But for the audio I/O I think you will need to use the
existing WebAudio interface. It is portable across multiple platforms. So
you don't really need PortAudio for JavaScript.
http://www.softsynth.com/links/webaudio.php
Phil Burk
Post by Darwin Sese
hi phil, emscripten doing is converting c/c++ code to javascript. So
portaudio will run to the browser
Post by Phil Burk
Those are all the PortAudio functions that pa_fuzz.c.
I don't know what emscriptem is but I suspect you need to tell it where
the PortAudio library is.
Phil Burk
Post by Darwin Sese
Hi folks
i tried to compile pa_fuzz.c with emscripten. but i got this error
warning: unresolved symbol: Pa_CloseStream
warning: unresolved symbol: Pa_GetDefaultOutputDevice
warning: unresolved symbol: Pa_GetErrorText
warning: unresolved symbol: Pa_GetLastHostErrorInfo
warning: unresolved symbol: Pa_Initialize
warning: unresolved symbol: Pa_OpenStream
warning: unresolved symbol: Pa_Sleep
warning: unresolved symbol: Pa_StartStream
warning: unresolved symbol: Pa_StopStream
warning: unresolved symbol: Pa_Terminate
warning: unresolved symbol: Pa_WriteStream
any idea?
Thanks!
--
Darwin Sese
<http://www.earnmailer.com/link/14976efb59a73c20>
<http://www.earnmailer.com/alert/confirm/14976efb59a73c20>
<http://www.earnmailer.com/>
_______________________________________________
Portaudio mailing list
https://lists.columbia.edu/mailman/listinfo/portaudio
--
Darwin Sese
<http://www.earnmailer.com/link/14976efb59a73c20>
<http://www.earnmailer.com/alert/confirm/14976efb59a73c20>
<http://www.earnmailer.com/>
_______________________________________________
Portaudio mailing list
https://lists.columbia.edu/mailman/listinfo/portaudio
Loading...