0

私は低遅延の高速パスを使用してVoIPアプリケーションを開発していますが、音声ルートをスピーカーに変更すると、Androidの待ち時間が短いOpenSLES:スピーカーへのオーディオルートの変更でレコーダーが動作しなくなる

E/ACDB-LOADER( 183): Error: ACDB AudProc vol returned = -19 
D/audio_hw_primary( 183): enable_snd_device: snd_device(32: speaker-mic) 
D/audio_hw_primary( 183): enable_audio_route: apply and update mixer path: low-latency-record 
D/audio_hw_primary( 183): disable_audio_route: reset and update mixer path: low-latency-record 
D/audio_hw_primary( 183): disable_snd_device: snd_device(32: speaker-mic) 
E/AudioFlinger( 183): read failed: framesRead=-2147483631 
D/audio_hw_primary( 183): select_devices: out_snd_device(0: none) in_snd_device(32: speaker-mic) 
D/msm8974_platform( 183): platform_send_audio_calibration: sending audio calibration for snd_device(32) acdb_id(11) 
D/  ( 183): Failed to fetch the lookup information of the device 0000000B 
E/ACDB-LOADER( 183): Error: ACDB AudProc vol returned = -19 
D/audio_hw_primary( 183): enable_snd_device: snd_device(32: speaker-mic) 
D/audio_hw_primary( 183): enable_audio_route: apply and update mixer path: low-latency-record 
D/audio_hw_primary( 183): disable_audio_route: reset and update mixer path: low-latency-record 
D/audio_hw_primary( 183): disable_snd_device: snd_device(32: speaker-mic) 
E/AudioFlinger( 183): read failed: framesRead=-2147483631 
D/audio_hw_primary( 183): select_devices: out_snd_device(0: none) in_snd_device(32: speaker-mic) 
D/msm8974_platform( 183): platform_send_audio_calibration: sending audio calibration for snd_device(32) acdb_id(11) 
D/  ( 183): Failed to fetch the lookup information of the device 0000000B 
E/ACDB-LOADER( 183): Error: ACDB AudProc vol returned = -19 
D/audio_hw_primary( 183): enable_snd_device: snd_device(32: speaker-mic) 
D/audio_hw_primary( 183): enable_audio_route: apply and update mixer path: low-latency-record 
D/audio_hw_primary( 183): disable_audio_route: reset and update mixer path: low-latency-record 
D/audio_hw_primary( 183): disable_snd_device: snd_device(32: speaker-mic) 
E/AudioFlinger( 183): read failed: framesRead=-2147483631 
D/audio_hw_primary( 183): select_devices: out_snd_device(0: none) in_snd_device(32: speaker-mic) 
D/msm8974_platform( 183): platform_send_audio_calibration: sending audio calibration for snd_device(32) acdb_id(11) 
D/  ( 183): Failed to fetch the lookup information of the device 0000000B 
E/ACDB-LOADER( 183): Error: ACDB AudProc vol returned = -19 
D/audio_hw_primary( 183): enable_snd_device: snd_device(32: speaker-mic) 
D/audio_hw_primary( 183): enable_audio_route: apply and update mixer path: low-latency-record 
D/audio_hw_primary( 183): disable_audio_route: reset and update mixer path: low-latency-record 
D/audio_hw_primary( 183): disable_snd_device: snd_device(32: speaker-mic) 
E/AudioFlinger( 183): read failed: framesRead=-2147483631 
D/audio_hw_primary( 183): select_devices: out_snd_device(0: none) in_snd_device(32: speaker-mic) 
D/msm8974_platform( 183): platform_send_audio_calibration: sending audio calibration for snd_device(32) acdb_id(11) 
D/  ( 183): Failed to fetch the lookup information of the device 0000000B 
E/ACDB-LOADER( 183): Error: ACDB AudProc vol returned = -19 
D/audio_hw_primary( 183): enable_snd_device: snd_device(32: speaker-mic) 
D/audio_hw_primary( 183): enable_audio_route: apply and update mixer path: low-latency-record 
D/audio_hw_primary( 183): disable_audio_route: reset and update mixer path: low-latency-record 
D/audio_hw_primary( 183): disable_snd_device: snd_device(32: speaker-mic) 
E/AudioFlinger( 183): read failed: framesRead=-2147483631 
  • デバイス:Nexus 5のアンドロイド5.0.1
  • ネイティブバッファサイズ240のサンプル (ショーツ)
  • ネイティブ周波数レート48000代わりに、それが動作するはずとして5msの次のエラーが発生したのHz再生プリセットER:
    SL_ANDROID_STREAM_VOICE
  • レコーダープリセット:MODE_IN_COMMUNICATION

上SL_ANDROID_RECORDING_PRESET_VOICE_COMMUNICATION

  • AudioManagerそれは、音声ルートは、ヘッドセットの上にとどまるならば、それは正常に動作していることに注意することが重要です。 問題が何であるか知っていますか?

  • 答えて

    0

    あなたのコードは、スピーカーへのルートを変更すると遅延を生成していることを私に伝えます。

    OpenSLはデフォルトでスピーカーにオーディオ再生をルーティングします。 streamTypeSL_ANDROID_STREAM_VOICEに設定すると、オーディオがヘッドセットにルーティングされます。オーディオをスピーカーに戻すときは、streamTypeをデフォルトに設定して、プレーヤーを再度初期化する必要があります。

    なぜ私はあなたのレコーダーコールバックが5msではなく100ms後に起動されるのか、正確な理由はわかりません。しかし、とにかく、私はあなたが正しくaudio sampling rate of your deviceを設定したと思います。

    また、もう1つの点はバッファサイズです。はい240は大丈夫です。しかし、レコーダーコールバックを頻繁に起動する必要がある場合は、より小さなサイズを設定してみてください。

    希望に役立ちます。

    +0

    答えをくれてありがとう、私はスピーカーにオーディオルートを変更するまで、レコーダーは5ミリ秒ごとに起動するので、何か間違いが起こるまでレコーダーが正常に動作します。だから、あなたは私がプレーヤーをオーディオルートごとに再初期化する必要があると言っていますか? – VitalyD

    +0

    わかりませんでした。ごめんなさい。もうあなたの問題は何ですか? –

    +0

    問題は、オーディオルートをスピーカーに変更すると、レコーダーのコールバックが機能しなくなるため、遠端側が私の声を聞くことができないことです。高速パスを使用する場合にのみ発生します。つまり、ネイティブのバッファサイズとサンプリングレートを使用する場合のみです。 – VitalyD

    関連する問題