第一种方法:

float sysVolume = 0.0;
UInt32 propertySize = sizeof(CFStringRef);
AudioSessionGetProperty(kAudioSessionProperty_CurrentHardwareOutputVolume,
&propertySize,
&sysVolume);

第二种方法:

[[MPMusicPlayerControllerapplicationMusicPlayer] volume]

相关文章:

  • 2022-12-23
  • 2021-05-12
  • 2022-12-23
  • 2021-07-20
  • 2021-10-09
  • 2022-12-23
猜你喜欢
  • 2021-11-18
  • 2021-11-07
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案