IOS AVAudioPlayer的最大音量级别? [英] IOS maximum volume level for AVAudioPlayer?

查看:99
本文介绍了IOS AVAudioPlayer的最大音量级别?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用AVAudioPlayer播放.caf文件。我的问题是:它不够响亮我的目的。由于iPhone的振铃声响亮得多,我想知道如何归档这个音量。
我已经尝试操纵.caf文件,但没有取得真正的成功。有什么想法吗?

I use the AVAudioPlayer to play a .caf file. My problem is: it is not loud enough for my purpose. Since the ringer sound of the IPhone is much louder I was wondering how I can archive this volume. I already tried to manipulate the .caf file but with no real success. Any ideas?

到目前为止我使用的代码:

The code I use so far:

    AVAudioPlayer *newPlayer = [[AVAudioPlayer alloc] initWithContentsOfURL: url error: nil];
self.appSoundPlayer = newPlayer;
[newPlayer release];
[appSoundPlayer prepareToPlay];
[appSoundPlayer setVolume: 0.8];
[appSoundPlayer setDelegate: self];
    [appSoundPlayer play];

编辑:

[appSoundPlayer setVolume: 1.0];

Thx
Martin

Thx Martin

推荐答案

您可以随时将音量设置为实际最大值,例如:

You could always set the volume to actual maximum eg:

[appSoundPlayer setVolume: 1.0];

除此之外,您可能需要自己编辑文件。

Other than that, you probably will have to edit the file itself.

这篇关于IOS AVAudioPlayer的最大音量级别?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆