PortAudio / portaudio

PortAudio is a cross-platform, open-source C language library for real-time audio input and output.
Other
1.43k stars 295 forks source link

Iphone ios SDK Deprecation #749

Open simdax opened 1 year ago

simdax commented 1 year ago

Hello all.

I'm trying to build portaudio for Ios, and I think I face some deprecated types.

../vendor/portaudio/src/hostapi/coreaudio/pa_mac_core_utilities.h:115:5: error: unknown type name 'AudioHardwarePropertyID'; did you mean 'AudioFormatPropertyID'?
    AudioHardwarePropertyID inPropertyID,
    ^~~~~~~~~~~~~~~~~~~~~~~
    AudioFormatPropertyID
../vendor/portaudio/src/hostapi/coreaudio/pa_mac_core_utilities.h:124:5: error: unknown type name 'AudioDeviceID'; did you mean 'AudioFileID'?
    AudioDeviceID         inDevice,
    ^~~~~~~~~~~~~
    AudioFileID

These defines are in AudioHardwareDeprecated.h, which not included in CoreAudio.h

I compile mac_core_utilities with this command

with meson, I'm able to compile only if I swap these two lines

    c_args: defines 
        + ['-isysroot', 
        '/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk'
        #'/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX12.3.sdk
        ]

What is the procedure to solve the problem :) ?

Thank you

simdax commented 1 year ago

I have to admit, than trying to compile only one file at a time, I see that int pa_core_internal.h, the compiler is giving up !

did not find header 'CoreAudio.h' in framework 'CoreAudio'

Indeed, for ios-simulator, coreaudio is way slimer !

Capture d’écran 2022-11-01 à 21 34 31
RossBencina commented 1 year ago

I don't understand, are you using our master branch? It does not support iOS. I believe someone is working on an iOS version but we have not merged it.

fabiankropp commented 1 year ago

@RossBencina any chance to shed some light on who is working on that IOS version? I would be willing to support and test for a project I am working on. I assume there would be more people being interested in that.

RossBencina commented 1 year ago

@fabiankropp Alexander Carôt posted a patched version here:

https://listserv.cuit.columbia.edu/scripts/wa.exe?A2=PORTAUDIO;a47942dc.2203C&S=

I think it would be best to reignite discussion on the mailing list. There are certainly people interested in it.

fabiankropp commented 1 year ago

Thanks for sharing, I will try to get in touch via the mailing list. To get this up to speed. I will take a look at the implementation as well.

fabiankropp commented 1 year ago

BTW. the mentioned "deprecation" is no deprecation, these types are just unavailable in iOS. IMHO this ticket can be closed