Page 1 of 1

Need help with PortAudio and SoundTouch on Purebasic

Posted: Wed Nov 19, 2014 3:54 pm
by dman10001
Hi all, trying to use PortAudio with on a Windows or Mac. I checked all the PureBasic forum and tried all the program examples but was unable to get the programs running. I need to know how and where to put the PortAudio files for PureBasic.


I do not need the BASS.DLL library.
if anyone knows how to use SoundTouch and/or PortAudio, please let me know.


please help

Re: Need help with PortAudio and SoundTouch on Purebasic

Posted: Wed Nov 19, 2014 10:19 pm
by infratec
Hi,

hm it works here without problems.

Win 7
the libportaudio-2.dll is in the same directory as the pb file.
The size is 164864.

In Linux the so file is at the normal place /usr/lib/

Bernd

Re: Need help with PortAudio and SoundTouch on Purebasic

Posted: Tue Nov 22, 2016 6:09 am
by dman10001
Thanks for the response. Im new to using portaudio.

Im trying to use portaudio on the mac to play mp3 music.
is there a demo I can get to follow on?

Please someone help.

Re: Need help with PortAudio and SoundTouch on Purebasic

Posted: Tue Nov 22, 2016 6:32 am
by dman10001
the code Im having trouble with :

Code: Select all

Procedure.s Pae_PaHostApiIndexToString(Ind)
  *info.PaHostApiInfo = Pa_GetHostApiInfo(Ind)
  ProcedureReturn PeekS(*info\name)
EndProcedure

Procedure.s DeviceString(*dev.PaDeviceInfo)
  ProcedureReturn PeekS(*dev\name) + " (" + Pae_PaHostApiIndexToString(*dev\hostApi) + ")"
EndProcedure
[00:31:27] [COMPILER] Line 13: Bad parameter type, number expected instead of string.
__________________________________________________
Code and quote tags added
22.11.2016
RSBasic

Re: Need help with PortAudio and SoundTouch on Purebasic

Posted: Tue Nov 22, 2016 8:00 am
by infratec
Hi,

for me it's not possible to see what's in line 13.
Please use code tags.

And, if you use PB 5.50 what you have not written, use:

Code: Select all

PeekS(*dev\name, -1, #PB_Ascii)
Bernd

Re: Need help with PortAudio and SoundTouch on Purebasic

Posted: Tue Nov 22, 2016 6:43 pm
by dman10001
Thanks for responding.

ok Im using version 5.43 on a mac, I should have mentioned it if it makes any difference.

I used the fix but it did not work same error and you did the wrong line.

it was line 13 and both routine.

Code: Select all

 Procedure.s Pae_PaHostApiIndexToString(Ind)
  *info.PaHostApiInfo = Pa_GetHostApiInfo(Ind)
  ProcedureReturn [color=#FF0000]PeekS(*info\name)[/color]
EndProcedure
it could be what I mentioned the version I used.

Re: Need help with PortAudio and SoundTouch on Purebasic

Posted: Tue Nov 22, 2016 8:23 pm
by infratec
OS X is always 'special' :wink:

If you use 5.43, have you checked unicode?
If yes, remove it.
On windows portaudio lib only uses ascii strings.

Or you have to add #PB_Ascii to each PeekS() or you have to modifiy the import wrapper to use p-Ascii as pseudotype.

Maybe any of our OS X gurus can assist you better than I.

Bernd

Re: Need help with PortAudio and SoundTouch on Purebasic

Posted: Tue Nov 22, 2016 9:16 pm
by dman10001
ok thanks, i will do more research and try the os x gurus.

thank you.