【问题标题】:how to set maximum volume? ios, audiounit [closed]如何设置最大音量? ios,audiounit [关闭]
【发布时间】:2013-11-10 13:16:46
【问题描述】:

我的应用程序如下所示: An iOS tone generator (an introduction to AudioUnits) 也会产生一些信号。 我想在应用程序启动时设置最大音量。怎么做?谢谢

【问题讨论】:

    标签: ios iphone volume audiounit


    【解决方案1】:

    这应该可行:

    float volume = 1.0f;
    [[MPMusicPlayerController applicationMusicPlayer] setVolume:volume];
    

    【讨论】:

      【解决方案2】:

      你可以这样做:

      [Music setVolume:0.3];
      [Music play];
      

      0.0 表示关闭音量,1.0 表示最大音量

      【讨论】:

        猜你喜欢
        • 2016-01-12
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 2012-03-30
        • 1970-01-01
        相关资源
        最近更新 更多