Skip to content

PortAudio driver does not build: portaudio_driver.h: error: unknown type name 'PortAudioStream' etc. #121

@barracuda156

Description

@barracuda156

Without PortAudio the build works now, but PortAudio driver fails:

Making all in portaudio
make[3]: Entering directory `/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_audio_jack/jack/work/jack1-0.126.0/drivers/portaudio'
  CC       portaudio_driver.lo
In file included from portaudio_driver.c:46:
portaudio_driver.h:58:9: error: unknown type name 'PortAudioStream'
   58 |         PortAudioStream*   stream;
      |         ^~~~~~~~~~~~~~~
portaudio_driver.c:120:13: error: unknown type name 'PaTimestamp'
  120 |             PaTimestamp outTime, void *userData)
      |             ^~~~~~~~~~~
portaudio_driver.c: In function 'portaudio_driver_set_parameters':
portaudio_driver.c:308:32: error: implicit declaration of function 'Pa_GetDefaultInputDeviceID'; did you mean 'Pa_GetDefaultInputDevice'? [-Wimplicit-function-declaration]
  308 |                 ((capturing) ? Pa_GetDefaultInputDeviceID () : paNoDevice),
      |                                ^~~~~~~~~~~~~~~~~~~~~~~~~~
      |                                Pa_GetDefaultInputDevice
portaudio_driver.c:312:30: error: implicit declaration of function 'Pa_GetDefaultOutputDeviceID'; did you mean 'Pa_GetDefaultOutputDevice'? [-Wimplicit-function-declaration]
  312 |                 ((playing) ? Pa_GetDefaultOutputDeviceID () : paNoDevice),
      |                              ^~~~~~~~~~~~~~~~~~~~~~~~~~~
      |                              Pa_GetDefaultOutputDevice
portaudio_driver.c:322:17: error: 'paCallback' undeclared (first use in this function); did you mean 'paNullCallback'?
  322 |                 paCallback,
      |                 ^~~~~~~~~~
      |                 paNullCallback
portaudio_driver.c:322:17: note: each undeclared identifier is reported only once for each function it appears in
portaudio_driver.c:307:17: error: passing argument 1 of 'Pa_OpenStream' from incompatible pointer type [-Wincompatible-pointer-types]
  307 |                 &driver->stream,
      |                 ^~~~~~~~~~~~~~~
      |                 |
      |                 int **
In file included from portaudio_driver.h:26:
/opt/local/include/portaudio.h:899:35: note: expected 'PaStream **' {aka 'void **'} but argument is of type 'int **'
  899 | PaError Pa_OpenStream( PaStream** stream,
      |                        ~~~~~~~~~~~^~~~~~
portaudio_driver.c:308:62: warning: passing argument 2 of 'Pa_OpenStream' makes pointer from integer without a cast [-Wint-conversion]
  308 |                 ((capturing) ? Pa_GetDefaultInputDeviceID () : paNoDevice),
      |                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~
      |                                                              |
      |                                                              int
/opt/local/include/portaudio.h:900:50: note: expected 'const PaStreamParameters *' but argument is of type 'int'
  900 |                        const PaStreamParameters *inputParameters,
      |                        ~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~
portaudio_driver.c:309:58: warning: passing argument 3 of 'Pa_OpenStream' makes pointer from integer without a cast [-Wint-conversion]
  309 |                 ((capturing) ? driver->capture_nchannels : 0),
      |                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~
      |                                                          |
      |                                                          long unsigned int
/opt/local/include/portaudio.h:901:50: note: expected 'const PaStreamParameters *' but argument is of type 'long unsigned int'
  901 |                        const PaStreamParameters *outputParameters,
      |                        ~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~
portaudio_driver.c:311:17: warning: passing argument 5 of 'Pa_OpenStream' makes integer from pointer without a cast [-Wint-conversion]
  311 |                 NULL,
      |                 ^~~~
      |                 |
      |                 void *
/opt/local/include/portaudio.h:903:38: note: expected 'long unsigned int' but argument is of type 'void *'
  903 |                        unsigned long framesPerBuffer,
      |                        ~~~~~~~~~~~~~~^~~~~~~~~~~~~~~
portaudio_driver.c:313:58: warning: passing argument 7 of 'Pa_OpenStream' makes pointer from integer without a cast [-Wint-conversion]
  313 |                 ((playing) ?  driver->playback_nchannels : 0),
      |                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~
      |                                                          |
      |                                                          long unsigned int
/opt/local/include/portaudio.h:905:42: note: expected 'int (*)(const void *, void *, long unsigned int,  const PaStreamCallbackTimeInfo *, PaStreamCallbackFlags,  void *)' {aka 'int (*)(const void *, void *, long unsigned int,  const PaStreamCallbackTimeInfo *, long unsigned int,  void *)'} but argument is of type 'long unsigned int'
  905 |                        PaStreamCallback *streamCallback,
      |                        ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~
portaudio_driver.c:314:17: warning: passing argument 8 of 'Pa_OpenStream' makes pointer from integer without a cast [-Wint-conversion]
  314 |                 paFloat32,              /* 32-bit float output */
      |                 ^~~~~~~~~
      |                 |
      |                 long unsigned int
/opt/local/include/portaudio.h:906:30: note: expected 'void *' but argument is of type 'long unsigned int'
  906 |                        void *userData );
      |                        ~~~~~~^~~~~~~~
portaudio_driver.c:306:19: error: too many arguments to function 'Pa_OpenStream'
  306 |         int err = Pa_OpenStream (
      |                   ^~~~~~~~~~~~~
/opt/local/include/portaudio.h:899:9: note: declared here
  899 | PaError Pa_OpenStream( PaStream** stream,
      |         ^~~~~~~~~~~~~
portaudio_driver.c: In function 'portaudio_load_default':
portaudio_driver.c:431:25: error: 'PaDeviceInfo' has no member named 'numSampleRates'
  431 |                 if ( pdi->numSampleRates == -1 ) {
      |                         ^~
portaudio_driver.c:432:69: error: 'PaDeviceInfo' has no member named 'sampleRates'
  432 |                         PALog ("Sample Rate Range = %f to %f\n", pdi->sampleRates[0], pdi->sampleRates[1]);
      |                                                                     ^~
portaudio_driver.c:432:90: error: 'PaDeviceInfo' has no member named 'sampleRates'
  432 |                         PALog ("Sample Rate Range = %f to %f\n", pdi->sampleRates[0], pdi->sampleRates[1]);
      |                                                                                          ^~
portaudio_driver.c:435:44: error: 'PaDeviceInfo' has no member named 'numSampleRates'
  435 |                         for (j = 0; j < pdi->numSampleRates; j++)
      |                                            ^~
portaudio_driver.c:436:54: error: 'PaDeviceInfo' has no member named 'sampleRates'
  436 |                                 PALog (" %8.2f,", pdi->sampleRates[j]);
      |                                                      ^~
portaudio_driver.c:441:24: error: 'PaDeviceInfo' has no member named 'nativeSampleFormats'
  441 |                 if (pdi->nativeSampleFormats & paInt8) {
      |                        ^~
portaudio_driver.c:444:24: error: 'PaDeviceInfo' has no member named 'nativeSampleFormats'
  444 |                 if (pdi->nativeSampleFormats & paUInt8) {
      |                        ^~
portaudio_driver.c:447:24: error: 'PaDeviceInfo' has no member named 'nativeSampleFormats'
  447 |                 if (pdi->nativeSampleFormats & paInt16) {
      |                        ^~
portaudio_driver.c:450:24: error: 'PaDeviceInfo' has no member named 'nativeSampleFormats'
  450 |                 if (pdi->nativeSampleFormats & paInt32) {
      |                        ^~
portaudio_driver.c:453:24: error: 'PaDeviceInfo' has no member named 'nativeSampleFormats'
  453 |                 if (pdi->nativeSampleFormats & paFloat32) {
      |                        ^~
portaudio_driver.c:456:24: error: 'PaDeviceInfo' has no member named 'nativeSampleFormats'
  456 |                 if (pdi->nativeSampleFormats & paInt24) {
      |                        ^~
portaudio_driver.c:459:24: error: 'PaDeviceInfo' has no member named 'nativeSampleFormats'
  459 |                 if (pdi->nativeSampleFormats & paPackedInt24) {
      |                        ^~
portaudio_driver.c:459:48: error: 'paPackedInt24' undeclared (first use in this function)
  459 |                 if (pdi->nativeSampleFormats & paPackedInt24) {
      |                                                ^~~~~~~~~~~~~
portaudio_driver.c: In function 'portaudio_load_driver':
portaudio_driver.c:513:25: error: 'PaDeviceInfo' has no member named 'numSampleRates'
  513 |                 if ( pdi->numSampleRates == -1 ) {
      |                         ^~
portaudio_driver.c:514:69: error: 'PaDeviceInfo' has no member named 'sampleRates'
  514 |                         PALog ("Sample Rate Range = %f to %f\n", pdi->sampleRates[0],
      |                                                                     ^~
portaudio_driver.c:515:35: error: 'PaDeviceInfo' has no member named 'sampleRates'
  515 |                                pdi->sampleRates[1]);
      |                                   ^~
portaudio_driver.c:518:44: error: 'PaDeviceInfo' has no member named 'numSampleRates'
  518 |                         for (j = 0; j < pdi->numSampleRates; j++)
      |                                            ^~
portaudio_driver.c:519:54: error: 'PaDeviceInfo' has no member named 'sampleRates'
  519 |                                 PALog (" %8.2f,", pdi->sampleRates[j]);
      |                                                      ^~
portaudio_driver.c:524:24: error: 'PaDeviceInfo' has no member named 'nativeSampleFormats'
  524 |                 if (pdi->nativeSampleFormats & paInt8) {
      |                        ^~
portaudio_driver.c:527:24: error: 'PaDeviceInfo' has no member named 'nativeSampleFormats'
  527 |                 if (pdi->nativeSampleFormats & paUInt8) {
      |                        ^~
portaudio_driver.c:530:24: error: 'PaDeviceInfo' has no member named 'nativeSampleFormats'
  530 |                 if (pdi->nativeSampleFormats & paInt16) {
      |                        ^~
portaudio_driver.c:533:24: error: 'PaDeviceInfo' has no member named 'nativeSampleFormats'
  533 |                 if (pdi->nativeSampleFormats & paInt32) {
      |                        ^~
portaudio_driver.c:536:24: error: 'PaDeviceInfo' has no member named 'nativeSampleFormats'
  536 |                 if (pdi->nativeSampleFormats & paFloat32) {
      |                        ^~
portaudio_driver.c:539:24: error: 'PaDeviceInfo' has no member named 'nativeSampleFormats'
  539 |                 if (pdi->nativeSampleFormats & paInt24) {
      |                        ^~
portaudio_driver.c:542:24: error: 'PaDeviceInfo' has no member named 'nativeSampleFormats'
  542 |                 if (pdi->nativeSampleFormats & paPackedInt24) {
      |                        ^~
portaudio_driver.c:542:48: error: 'paPackedInt24' undeclared (first use in this function)
  542 |                 if (pdi->nativeSampleFormats & paPackedInt24) {
      |                                                ^~~~~~~~~~~~~
portaudio_driver.c: In function 'portaudio_driver_new':
portaudio_driver.c:622:22: error: implicit declaration of function 'Pa_CountDevices' [-Wimplicit-function-declaration]
  622 |         numDevices = Pa_CountDevices ();
      |                      ^~~~~~~~~~~~~~~
portaudio_driver.c:636:31: error: 'paHostError' undeclared (first use in this function); did you mean 'paNoError'?
  636 |                         err = paHostError;
      |                               ^~~~~~~~~~~
      |                               paNoError
portaudio_driver.c:688:30: error: 'paCallback' undeclared (first use in this function); did you mean 'paNullCallback'?
  688 |                              paCallback,
      |                              ^~~~~~~~~~
      |                              paNullCallback
portaudio_driver.c:675:30: error: passing argument 1 of 'Pa_OpenStream' from incompatible pointer type [-Wincompatible-pointer-types]
  675 |         err = Pa_OpenStream (&driver->stream,
      |                              ^~~~~~~~~~~~~~~
      |                              |
      |                              int **
/opt/local/include/portaudio.h:899:35: note: expected 'PaStream **' {aka 'void **'} but argument is of type 'int **'
  899 | PaError Pa_OpenStream( PaStream** stream,
      |                        ~~~~~~~~~~~^~~~~~
portaudio_driver.c:676:94: warning: passing argument 2 of 'Pa_OpenStream' makes pointer from integer without a cast [-Wint-conversion]
  676 |                              ((capturing && (driver->capture_nchannels > 0)) ? inputDeviceID : paNoDevice),
      |                              ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~
      |                                                                                              |
      |                                                                                              int
/opt/local/include/portaudio.h:900:50: note: expected 'const PaStreamParameters *' but argument is of type 'int'
  900 |                        const PaStreamParameters *inputParameters,
      |                        ~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~
portaudio_driver.c:677:71: warning: passing argument 3 of 'Pa_OpenStream' makes pointer from integer without a cast [-Wint-conversion]
  677 |                              ((capturing) ? driver->capture_nchannels : 0),
      |                              ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~
      |                                                                       |
      |                                                                       long unsigned int
/opt/local/include/portaudio.h:901:50: note: expected 'const PaStreamParameters *' but argument is of type 'long unsigned int'
  901 |                        const PaStreamParameters *outputParameters,
      |                        ~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~
portaudio_driver.c:679:30: warning: passing argument 5 of 'Pa_OpenStream' makes integer from pointer without a cast [-Wint-conversion]
  679 |                              NULL,
      |                              ^~~~
      |                              |
      |                              void *
/opt/local/include/portaudio.h:903:38: note: expected 'long unsigned int' but argument is of type 'void *'
  903 |                        unsigned long framesPerBuffer,
      |                        ~~~~~~~~~~~~~~^~~~~~~~~~~~~~~
portaudio_driver.c:681:70: warning: passing argument 7 of 'Pa_OpenStream' makes pointer from integer without a cast [-Wint-conversion]
  681 |                              ((playing) ? driver->playback_nchannels : 0),
      |                              ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~
      |                                                                      |
      |                                                                      long unsigned int
/opt/local/include/portaudio.h:905:42: note: expected 'int (*)(const void *, void *, long unsigned int,  const PaStreamCallbackTimeInfo *, PaStreamCallbackFlags,  void *)' {aka 'int (*)(const void *, void *, long unsigned int,  const PaStreamCallbackTimeInfo *, long unsigned int,  void *)'} but argument is of type 'long unsigned int'
  905 |                        PaStreamCallback *streamCallback,
      |                        ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~
portaudio_driver.c:682:30: warning: passing argument 8 of 'Pa_OpenStream' makes pointer from integer without a cast [-Wint-conversion]
  682 |                              paFloat32,                     // 32 bit floating point output
      |                              ^~~~~~~~~
      |                              |
      |                              long unsigned int
/opt/local/include/portaudio.h:906:30: note: expected 'void *' but argument is of type 'long unsigned int'
  906 |                        void *userData );
      |                        ~~~~~~^~~~~~~~
portaudio_driver.c:675:15: error: too many arguments to function 'Pa_OpenStream'
  675 |         err = Pa_OpenStream (&driver->stream,
      |               ^~~~~~~~~~~~~
/opt/local/include/portaudio.h:899:9: note: declared here
  899 | PaError Pa_OpenStream( PaStream** stream,
      |         ^~~~~~~~~~~~~
portaudio_driver.c: In function 'driver_initialize':
portaudio_driver.c:832:23: warning: unused variable 'deviceID' [-Wunused-variable]
  832 |         AudioDeviceID deviceID = 0;
      |                       ^~~~~~~~
make[3]: *** [portaudio_driver.lo] Error 1

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions