cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
2995
Views
0
Helpful
9
Replies

iOS ACBClientSDK - AudioManager speakerphone - too low volume

Hello,

is it possible to set volume to phone.audiomanager in code ? Becaouse it is too low and I can't hear other side.

When I use headset and change audiomanager to headset volume is perfect.

iPhone is set to maximum volume. And in code AVFoundation is also set to max volume

and I also override hardware to use speaker and it dosen't work.

Regards,

Matous

1 Accepted Solution

Accepted Solutions

Hi Matous,

Are you running with REM 11.6(1)_ES4 which has been tested as fixed for your initial issue?


Regards,

Rob

View solution in original post

9 Replies 9

robdoyle
Cisco Employee
Cisco Employee

Hi Matous,

I assume your referring to the ACBAudioDeviceManager, which allows the app to select the audio output device.

Are you calling [phone.audioDeviceManager setAudioDevice:ACBAudioDeviceSpeakerphone], and finding the volume to be too low?

We don’t offer an API to set the volume, we just rely on the system volume controls.

I’m not clear on what you mean by:

  • And in code AVFoundation is also set to max volume
  • I also override hardware to use speaker and it doesn't work

Can you clarify exactly what you did?

Thanks,

Rob

Hi Rob,

once again I need your help .

Code to call AudioManager:

        // audio manager

        self.phone?.audioDeviceManager.start()

        self.audioSession = AVAudioSession.sharedInstance()

       

        var pointer:ACBAudioDevice?

        // is headset plugged in

        if (Common.instance.isHeadsetPluggedIn()) {

            pointer = ACBAudioDevice.wiredHeadset

            self.phone?.audioDeviceManager.setAudioDevice(&pointer!)

        } else {

            pointer = ACBAudioDevice.speakerphone

            self.phone?.audioDeviceManager.setAudioDevice(&pointer!)

        }

Register observer for plugged headset:

        observer = NotificationCenter.default.addObserver(

            self,

            selector: #selector(CallController.audioRouteChangeListener(notification:)),

            name: NSNotification.Name.AVAudioSessionRouteChange,

            object: nil)

Observer notification function:

    @objcfunc audioRouteChangeListener(notification:Notification) {

        let audioRouteChangeReason = notification.userInfo![AVAudioSessionRouteChangeReasonKey] as! UInt

       

        switch audioRouteChangeReason {

        case AVAudioSessionRouteChangeReason.newDeviceAvailable.rawValue:

           

            if (self.phone != nil) {

                // set headset

                var pointer = ACBAudioDevice.wiredHeadset

                self.phone?.audioDeviceManager.setAudioDevice(&pointer)

            }

           

            break

        case AVAudioSessionRouteChangeReason.oldDeviceUnavailable.rawValue:

          

            if (self.phone != nil) {

                // set speaker

                var pointer = ACBAudioDevice.speakerphone

                self.phone?.audioDeviceManager.setAudioDevice(&pointer)

                // override speakerphone to be the one

                try! self.audioSession?.overrideOutputAudioPort(AVAudioSessionPortOverride.speaker)

            }

           

            break

        default:

            // not need to be implemented

            break

        }

    }

I use swift. It works perfectly in all other things so I assume that is no problem in using Swift. The "audioDeviceManager.audioDevices()" return array with one item.

Hi Matous,

Please print out the value of "audioDeviceManager.audioDevices()" when the headset is not plugged in and then when it is plugged in.

After this print out [uc.phone.audioDeviceManager selectedAudioDevice];

Rob

Hi Rob,

when headset is plugged in

audioDeviceManager.audioDevices() {

     0,

     0

}

audioDeviceManager.selectedAudioDevice(): nil

when headset is not plugged in

audioDeviceManager.audioDevices() {

     0

}

audioDeviceManager.selectedAudioDevice(): nil

Matous

Hi Matous,


Your results don’t make much sense to me:

a) I don’t know why there would be duplicate values in ‘audioDevices()’

b) I don’t know why ‘selectedAudioDevice()’ would return nil.


I'll have to raise a bug internally.

What device and iOS version were you testing on?


Rob

Hi Rob,

iOS version is 11.1.1

iPhone is iPhone5s

Matous

Hi,

I tried patched version of ACBClientSDK for sound form the speaker.

And I have one problem.

For the first time when app is launched. The first call audio is not form the speaker. Other calls works perfectly

When in the first call headphones are plugged in and out the audio is from speaker.

But the first call audio is always from ear-speaker.

I changed the order of "setAudioDevice". And I called them all when call was connected and nothing worked.

Do you have any idea that might help ?

Regards.

Matous

Hi Matous,

Are you running with REM 11.6(1)_ES4 which has been tested as fixed for your initial issue?


Regards,

Rob

Hi Rob,

I used REM 11.6.1.10000-7-ES2 from Dec. 22, 2017 found on URL: developer.cisco.com.

Thank you. I'll try ES4

Regards,

Matous

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: