Quantcast
Channel: Xojo Programming Forum - Latest topics
Viewing all articles
Browse latest Browse all 3780

CoreAudioMBS returns code -1

$
0
0

Hi,

I need to get the volume of the default sound output on iOS. GetSoundVolumeMBS raises an exception (not supported on iOS), although the documentation says iOS is supported (:heavy_check_mark:).

So I’m trying another approach, with CoreAudioMBS:

Var CoreAudio As new CoreAudioMBS

Var m As MemoryBlock=CoreAudio.AudioHardwareGetPropertyMemory(CoreAudio.kAudioHardwarePropertyDefaultOutputDevice)
if CoreAudio.Lasterror<>0 then Break
Var DfltOut As Integer
if m<>nil then DfltOut=m.Int32Value(0)

With this code, m is nil and LastErrorCode=-1. The same code works on Mac OS (I tested on the emulator). Is it an entitlement issue? Or something else?

4 posts - 2 participants

Read full topic


Viewing all articles
Browse latest Browse all 3780

Trending Articles