views:

2374

answers:

3
Cannot find executable for CFBundle/CFPlugIn 0x432bfa0 </Library/Audio/Plug-Ins/HAL/DVCPROHDAudio.plugin> (not loaded)
Cannot find function pointer NewPlugIn for factory C5A4CE5B-0BB8-11D8-9D75-0003939615B6 in CFBundle/CFPlugIn 0x432bfa0 </Library/Audio/Plug-Ins/HAL/DVCPROHDAudio.plugin> (not loaded)

That's the error I get when I try to run this code:

    NSString *path = [[NSBundle mainBundle] pathForResource:[arraySubFarts objectAtIndex:indexPath.row] ofType:@"mp3"];
    NSURL *file = [[NSURL alloc] initFileURLWithPath:path];
    AVAudioPlayer *player = [[AVAudioPlayer alloc]
                       initWithContentsOfURL:file error:nil];

    self.player = player;
    [player prepareToPlay];
    [player setDelegate:self];
    [self.player play];

Any idea why? :S

I have included the needed frameworks, and the code works great, the only thing is this odd Console-message..

EDIT: New odd messages:

AddRunningClient starting device on non-zero client count

when playing mp3.

+1  A: 

There is a fairly old thread over at Apple support that might have some sage advice.

The suggestion is to try running Disk Utility on your system, clicking "Repair Disk Permissions". The symptom may be that, for whatever reason, the DVCPROHDAudio.plugin file has lost its execute mode or has had its owner id changed.

WineSoaked
Thanks, I'll try.
Emil
+2  A: 

As it seams that the problem isn't in the code, there may multiple causes for your problem, so:

  1. I recommend you create a simple project in which you put the simplest audio file or run one of the apple's sample project, like Metronome or avTouch

  2. Try to uninstall XCode by writing in Terminal:

    sudo /Developer/Library/uninstall-devtools --mode=all
    

    and re-install XCode because sometimes there appear some problems in the instalation process of the XCode(I had some errors too, but they dissapeared after a clean install).

  3. Try to play the same file with MPMoviePlayerController

  4. Try to run on the iPhone.

The message "AddRunningClient starting device on non-zero client count" also appears for mpmoviePlayercontroller on iPhone SDK 4.0 Beta, so you don't have to worry too much about it.

Hope my answer helps you!

mxg
Clean install didn't work for me.
alexbw
A: 

try deleting or renaming the plugin file to something like ...plugin.old and re-run your code to see if you get the error still.

Rick Brown