Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

record amr_nb expection #388

Open
maghzchenyu opened this issue Dec 26, 2024 · 0 comments
Open

record amr_nb expection #388

maghzchenyu opened this issue Dec 26, 2024 · 0 comments

Comments

@maghzchenyu
Copy link

example

await recorderController.record(
androidEncoder: AndroidEncoder.amr_nb,
androidOutputFormat: AndroidOutputFormat.amr_nb,
path: filePath,
sampleRate: DMConstants.audioSampleRate,
bitRate: DMConstants.audioBitRate);

Log:

start failed: -22
2024-12-26 16:05:10.437 10011-10011 MethodChan...in/methods com.duomessenger.android E Failed to handle method call
java.lang.RuntimeException: start failed.
at android.media.MediaRecorder.start(Native Method)
at com.simform.audio_waveforms.AudioRecorder.startRecorder(AudioRecorder.kt:111)
at com.simform.audio_waveforms.AudioWaveformsPlugin.onMethodCall(AudioWaveformsPlugin.kt:62)
at io.flutter.plugin.common.MethodChannel$IncomingMethodCallHandler.onMessage(MethodChannel.java:267)
at io.flutter.embedding.engine.dart.DartMessenger.invokeHandler(DartMessenger.java:292)
at io.flutter.embedding.engine.dart.DartMessenger.lambda$dispatchMessageToQueue$0$io-flutter-embedding-engine-dart-DartMessenger(DartMessenger.java:319)
at io.flutter.embedding.engine.dart.DartMessenger$$ExternalSyntheticLambda0.run(Unknown Source:12)
at android.os.Handler.handleCallback(Handler.java:958)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loopOnce(Looper.java:222)
at android.os.Looper.loop(Looper.java:314)
at android.app.ActivityThread.main(ActivityThread.java:8790)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:561)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1013)
2024-12-26 16:05:10.441 10011-11381 flutter com.duomessenger.android E [ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: PlatformException(error, start failed., null, java.lang.RuntimeException: start failed.
at android.media.MediaRecorder.start(Native Method)
at com.simform.audio_waveforms.AudioRecorder.startRecorder(AudioRecorder.kt:111)
at com.simform.audio_waveforms.AudioWaveformsPlugin.onMethodCall(AudioWaveformsPlugin.kt:62)
at io.flutter.plugin.common.MethodChannel$IncomingMethodCallHandler.onMessage(MethodChannel.java:267)
at io.flutter.embedding.engine.dart.DartMessenger.invokeHandler(DartMessenger.java:292)
at io.flutter.embedding.engine.dart.DartMessenger.lambda$dispatchMessageToQueue$0$io-flutter-embedding-engine-dart-DartMessenger(DartMessenger.java:319)
at io.flutter.embedding.engine.dart.DartMessenger$$ExternalSyntheticLambda0.run(Unknown Source:12)
at android.os.Handler.handleCallback(Handler.java:958)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loopOnce(Looper.java:222)
at android.os.Looper.loop(Looper.java:314)
at android.app.ActivityThread.main(ActivityThread.java:8790)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:561)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1013)
)
#0 StandardMethodCodec.decodeEnvelope (package:flutter/src/services/message_codecs.dart:648:7)
#1 MethodChannel._invokeMethod (package:flutter/src/services/platform_channel.dart:334:18)

#2 AudioWaveformsInterface.record (package:audio_waveforms/src/base/audio_waveforms_interface.dart:20:25)

#3 RecorderController.record (package:audio_waveforms/src/controllers/recorder_controller.dart:220:26)

#4 DmImLogic.showRecordWave (package:flutter_duomessenger/page/dm_im/dm_im_logic.dart:180:5)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant