I get a MediaException (Prefetch error: -5) when executing the following code on a Nokia N73. It runs fine in the emulator and I have tried the same thing before on the same phone successfully. The only difference now is that I am using NetBeans to build and deploy rather than Eclipse.
inputPlayer = Manager.createPlayer("capture://audio?encoding=pcm&rate=4000&bits=16&channels=1");
inputPlayer.realize();
inputPlayer.prefetch();
inputPlayer.start();
I am wondering whether it is security related, as with Eclipse I always got a security prompt on the phone. With NetBeans I do not get any prompt, just the Exception.
-5 is Symbian error code KErrNotSupported.
The N73 is based on Symbian OS v9.1
Native (from Symbian C++) error codes are sometimes propagated into Java exceptions when the JSR-135 implementation couldn't find a nicer way to express the error.