声音模拟器玩,但不是在装置 [英] Sound plays in emulator, but not on device

查看:219
本文介绍了声音模拟器玩,但不是在装置的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图找到或转换声音文件在我的Andr​​oid游戏中使用,将同时在模拟器中播放(这是相当容易做到),以及一个物理设备(这似乎是很难做到)。

I'm trying to find or convert sound files to use in my Android game that will play on both the emulator (which is rather easy to do) as well as a physical device (which appears to be harder to do).

我原来的声音效果是.wav文件,16位立体声,发挥就好在模拟器和测试设备两者,但120KB(其乘以5我的文件的大小,我需要两个声音效果!)和不是一个适当的声音进行游戏。

My original sound effect was a .Wav file, 16 bit stereo and played just fine on both the emulator and testing device, but was 120Kb (which multiplied my file size by five, and I need two more sound effects!) and wasn't an appropriate sound for the game.

任何企图使文件较小(改变它为单声道,采用8位而不是16,将其转换为一个MP3等)造成的声音失败要在物理设备上播放。

Any attempts make the file smaller (changing it to mono, using 8 bits instead of 16, converting it to an MP3, etc.) caused the sound to fail to be played on the physical device.

有什么方法来确定去codeR已经尝试读取声音文件什么问题?在加载时间日志文件不给任何错误消息,并且只写着样品的 X 的还没有准备好当我尝试播放它。

Is there any way to determine what problems the decoder has trying to read the sound files? The log files don't give any error messages during load times, and only says "sample x is not READY" when I try to play it.

另外,我使用的是Android 1.5,我的物理设备不能升级到更高版本,所以现在很难限制。

Also, I'm using Android 1.5 and can't upgrade my physical device to a later version, so it's hard limit right now.

推荐答案

为Android声音文件建议格式为: OGG 。尝试使用。

The recommended format for Android sound files is ogg. Try using that.

这篇关于声音模拟器玩,但不是在装置的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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