video-quickstart-ios: Issue: problems with TVILocalAudioTrack gain after updating SDK

Hi!

I have updated my app to the latest version of Twilio iOS SDK and faced with strange issue: other participant almost stopped to hear me. He only hear if I knock directly in my phone’s microphone. Other VoIP apps works fine, so I believe that it’s not a problem with device.

I have checked [[AVAudioSession sharedInstance] inputGain], it returns 1.0f.

Also I have tried TVIAudioOptions.levelControl, but still without success 😦

self.localAudioTrack = [TVILocalAudioTrack trackWithOptions:[TVIAudioOptions optionsWithBlock:^(TVIAudioOptionsBuilder * _Nonnull builder) {
      builder.levelControl = YES;
        }] enabled:YES];

About this issue

  • Original URL
  • State: closed
  • Created 7 years ago
  • Comments: 17 (10 by maintainers)

Most upvoted comments

Hi, What are the maximum and minimum values of TVILocalAudioTrackStats audioLevel?

I’m sorry, I should have been more clear. You can request stats to be collected from the room:

/**
 * @brief Retrieve stats for all media tracks.
 *
 * @param block The block to be invoked when the stats are available.
 *
 * @discussion Stats are retrieved asynchronously. In the case where the room is the `TVIRoomStateDisconnected` state,
 *             reports won't be delivered.
 */
- (void)getStatsWithBlock:(nonnull TVIRoomGetStatsBlock)block;

In my app, I have a timer that fires once a second that requests statistics to be collected. From there you can access the TVILocalAudioTrackStats from the TVIStatsReport objects that are passed into the block.