views:

282

answers:

1

I've developed an iPhone application that plays Sound.

However, when I play a sound in the simulator, the console shows the lines below (also shown in this screenshot).

[12:07:07.505 <0xb0185000>] could not find audio decoder component 64766938 for registration
[12:07:07.506 <0xb0185000>] could not find audio decoder component 6D730011 for registration
[12:07:07.514 <0xb0185000>] could not find audio decoder component 696C6263 for registration
[12:07:07.514 <0xb0185000>] could not find audio decoder component 6D730031 for registration
[12:07:07.515 <0xb0185000>] could not find audio decoder component 696C6263 for registration

What is the problem?

A: 

How are you loading the file and, how are you adding the file to the application?

If you are including your sound file in the app's bundle, this error can be caused because you are incorrectly loading the resource.

If that is the case, this is the code you want to retrieve the sound file:

NSString *resPath = [[NSBundle mainBundle] pathForResource:kMySoundFileName ofType:kMySoundFileNameExtension inDirectory:@""];

Roger Nolan
I used this code:NSString *path = [[NSBundle mainBundle] pathForResource:soundName ofType:type];
Nahid