与iOS6的AVAudioPlayer iPhone4S的工作,但没有声音 [英] iPhone4S with iOS6 AVAudioPlayer is working, but no sound

查看:147
本文介绍了与iOS6的AVAudioPlayer iPhone4S的工作,但没有声音的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我创建了一个简单的音频应用程序,它起着一个MP3文件。它的工作原理与模拟器没有问题(iOS 5及6)和iPod3GS(与iOS 5.1)。但是,当我试图在我的iPhone4S(iOS 6中),似乎工作,但不健全的东西。

I created a simple audio app which plays a mp3 file. It works with no problem on Simulator(iOS 5 and 6) and iPod3GS (with iOS 5.1). But when I tried on my iPhone4S(iOS 6), it seems to work but doesn't sound anything.

[audioPlayer持续时间]给我正确的价值,并委托甚至audioPlayerDidFinishPlaying消息显示播放的时间之后的权利整理。

我的iPhone4S的工作与其他声音应用程序,如音乐,视频或播客没有问题的。
只有它才能不健全与我自己的自定义应用程序。

"[audioPlayer duration]" gives me right value, and even "audioPlayerDidFinishPlaying" message of delegate shows the right finishing of play after duration time.

My iPhone4S works with no problem in other sound apps like Music, Video or Podcast. Only it can't sound with my own custom app.

NSURL *url = [NSURL fileURLWithPath:[[NSBundle mainBundle] pathForResource:@"banana" ofType:@"mp3"]];
NSError *error;
if (error) {
    NSLog(@"error in audioPlayer:%@", [error localizedDescription]);
}
else {
    self.audioPlayer.delegate = self;
    [self.audioPlayer prepareToPlay];
}

这纯粹是一个设备问题或有关于这个问题的任何线索?
任何人都有类似的经历?

Is it simply a device problem or is there any clue about this problem? Anyone had the similar experience?

重置我的手机上设置的价值观和我重新启动,但仍是同样的问题。
我和MP3,WAV和AIFF文件进行测试。

I reset setting values on my phone and I rebooted it, but still the same problem. I tested with mp3, wav and aiff files.

推荐答案

将消音器了。

和仔细检查你的两个的卷出现了。

And double-check that you have both volumes turned up.

这篇关于与iOS6的AVAudioPlayer iPhone4S的工作,但没有声音的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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