mail-archives/monodroid/2011-December/008118.html

114 строки
4.8 KiB
HTML

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<TITLE> [mono-android] Using MediaRecorder
</TITLE>
<LINK REL="Index" HREF="index.html" >
<LINK REL="made" HREF="mailto:monodroid%40lists.ximian.com?Subject=%5Bmono-android%5D%20Using%20MediaRecorder&In-Reply-To=">
<META NAME="robots" CONTENT="index,nofollow">
<META http-equiv="Content-Type" content="text/html; charset=us-ascii">
<LINK REL="Previous" HREF="008120.html">
<LINK REL="Next" HREF="008124.html">
</HEAD>
<BODY BGCOLOR="#ffffff">
<H1>[mono-android] Using MediaRecorder</H1>
<B>John Croft</B>
<A HREF="mailto:monodroid%40lists.ximian.com?Subject=%5Bmono-android%5D%20Using%20MediaRecorder&In-Reply-To="
TITLE="[mono-android] Using MediaRecorder">jcroft at atlantaprogramming.com
</A><BR>
<I>Wed Dec 28 18:03:40 EST 2011</I>
<P><UL>
<LI>Previous message: <A HREF="008120.html">[mono-android] An examples using the SearchDialog?
</A></li>
<LI>Next message: <A HREF="008124.html">[mono-android] Cairo.Matrix dll gives an Error Object reference not set to an instance of an object
</A></li>
<LI> <B>Messages sorted by:</B>
<a href="date.html#8118">[ date ]</a>
<a href="thread.html#8118">[ thread ]</a>
<a href="subject.html#8118">[ subject ]</a>
<a href="author.html#8118">[ author ]</a>
</LI>
</UL>
<HR>
<!--beginarticle-->
<PRE>When I try to call MediaRecorder.SetAudioSource(AudioSource.Mic) I get the
following error and stack trace:
UNHANDLED EXCEPTION: Java.Lang.RuntimeException: Exception of type
'Java.Lang.RuntimeException' was thrown.
I/MonoDroid(20246): at Android.Runtime.JNIEnv.CallVoidMethod
(intptr,intptr,Android.Runtime.JValue[]) &lt;0x00074&gt;
I/MonoDroid(20246): at Android.Media.MediaRecorder.SetAudioSource
(Android.Media.AudioSource) &lt;0x00157&gt;
I/MonoDroid(20246): at
SimpleMediaRecorder.MediaRecorderActivity.StartRecording () &lt;0x0005f&gt;
I/MonoDroid(20246): at
SimpleMediaRecorder.MediaRecorderActivity.&lt;OnCreate&gt;m__0
(object,System.EventArgs) &lt;0x00027&gt;
I/MonoDroid(20246): at
Android.Views.View/IOnClickListenerImplementor.OnClick (Android.Views.View)
&lt;0x0005f&gt;
I/MonoDroid(20246): at
Android.Views.View/IOnClickListenerInvoker.n_OnClick_Landroid_view_View_
(intptr,intptr,intptr) &lt;0x00063&gt;
I/MonoDroid(20246): at (wrapper dynamic-method)
object.e0cb1123-e1af-4525-961a-2bac254e4ede (intptr,intptr,intptr) &lt;0x00033&gt;
I/MonoDroid(20246):
I/MonoDroid(20246): --- End of managed exception stack trace ---
I/MonoDroid(20246): java.lang.RuntimeException: setAudioSource failed.
I/MonoDroid(20246): at android.media.MediaRecorder.setAudioSource(Native
Method)
I/MonoDroid(20246): at
mono.android.view.View.OnClickListenerImplementor.n_onClick(Native Method)
I/MonoDroid(20246): at
mono.android.view.View.OnClickListenerImplementor.onClick(OnClickListenerImplementor.java:27)
I/MonoDroid(20246): at android.view.View.performClick(View.java:2408)
I/MonoDroid(20246): at android.view.View$PerformClick.run(View.java:8816)
I/MonoDroid(20246): at android.os.Handler.handleCallback(Handler.java:587)
I/MonoDroid(20246): at android.os.Handler.dispatchMessage(Handler.java:92)
I/MonoDroid(20246): at android.os.Looper.loop(Looper.java:123)
I/MonoDroid(20246): at
android.app.ActivityThread.main(ActivityThread.java:4627)
I/MonoDroid(20246): at java.lang.reflect.Method.invokeNative(Native Method)
I/MonoDroid(20246): at java.lang.reflect.Method.invoke(Method.java:521)
I/MonoDroid(20246): at
com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:858)
I/MonoDroid(20246): at
com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
I/MonoDroid(20246): at dalvik.system.NativeStart.main(Native Method)
TIA -
John
--
View this message in context: <A HREF="http://mono-for-android.1047100.n5.nabble.com/Using-MediaRecorder-tp5106306p5106306.html">http://mono-for-android.1047100.n5.nabble.com/Using-MediaRecorder-tp5106306p5106306.html</A>
Sent from the Mono for Android mailing list archive at Nabble.com.
</PRE>
<!--endarticle-->
<HR>
<P><UL>
<!--threads-->
<LI>Previous message: <A HREF="008120.html">[mono-android] An examples using the SearchDialog?
</A></li>
<LI>Next message: <A HREF="008124.html">[mono-android] Cairo.Matrix dll gives an Error Object reference not set to an instance of an object
</A></li>
<LI> <B>Messages sorted by:</B>
<a href="date.html#8118">[ date ]</a>
<a href="thread.html#8118">[ thread ]</a>
<a href="subject.html#8118">[ subject ]</a>
<a href="author.html#8118">[ author ]</a>
</LI>
</UL>
<hr>
<a href="http://lists.ximian.com/mailman/listinfo/monodroid">More information about the Monodroid
mailing list</a><br>
</body></html>