NYTom
NYTom

Reputation: 524

Cant play wav audio file on IPhone or Mac

Im developing an IPhone app and am including a sound file to play. I want to convert it to a CAF file. I know about the afconvert tool, but my problem is any of the MAC audio tools like afplay just return an error: Error: AudioFileOpen failed ('dta?')

Here is my command: afplay /Users/Thomas/Downloads/cash.wav

I know its not a permissions issue because I did a chmod 777 and can run file /Users/Thomas/Downloads/cash.wav which returns: cash.wav: RIFF (little-endian) data, WAVE audio, MPEG Layer 3, mono 16000 Hz

FYI, if I open the file in iTunes is plays in there.

Thanks for any help in my problem. -Tom

Upvotes: 1

Views: 1442

Answers (1)

iluvcapra
iluvcapra

Reputation: 9464

Use iTunes on your dev system to convert this file.

  • This file is a WAV-wrapped MP3 bitstream. While not technically wrong, it's a very unusual format and this is almost certainly why you're getting dta?
  • This file is at a bizarre sample rate that the hardware decode may not support.

iTunes is quite a bit more liberal about what it will play and convert.

Upvotes: 2

Related Questions