views:

29

answers:

1

Hi,

I want to create an application for the iPhone that plays a custom memory buffer. I am currently using AVAudioPlayer class and I am pretty sure that the function I should use is "initWithData:error:".

The problem is that I don't know which kind of data I have to pass as an argument, and reading the poor API doesn't help me much.

Can someone please help me or send me an example of a working input?

Thanks for helping!

Sagiftw

+1  A: 

You need to make an NSData object.

Make that data object like this: [NSData dataWithContentsOfFile: @"The song file name.type"]

tadej5553
Oh, and BTW, the APIs are very good, you just need to learn to read them.
tadej5553