tags:

views:

161

answers:

1

OK. If one uses the System Sounds Services for iPhone sound effects, there is no way to alter the level of the resulting sounds programmatically. Even worse, if one reduces the volume using the ringer volume control on the side of the iPhone to a very low level, then starts the app, the sound effects will be inaudible. On the other hand, if one increases the hardware level to the max before starting the app, sound effects will be uncomfortably loud. To all intents and purposes, this renders the System Sounds APIs useless (or at least ill-advised.) All of this is moot with regard to the iPod, as it does not show this behavior (after all, it isn't a phone.)

I decided to use an AVAudioplayer to play sound effects. Under iPhone SDK 3.1, my existing aiff files (mostly u-law format) work fine, but they won't play under SDK 3.0, and I get an error msg that the codec can't be found. According to Apple's documentation, I can use any supported file format under the caf umbrella, but there must be a codec available.

I have searched diligently, but although I have found lists of codecs available for Mac OS X, I can't find a list of codecs for the iPhone, particularly for SDK 3.0. Can anyone point me to such a list? I want my game (Imp or Oaf?) to work on OS 3.0 and later. I can use mp3 files, but there are latency problems there.

Thanks, Dan

A: 

I can't point you to a list, but ima4 has worked for me since day 1. ima4 has a 1/4 compression ratio.

In Terminal, do this:

afconvert -f caff -d ima4 original_filename.wav
coneybeare