gpt4 book ai didi

android - Soloud + OpenSLES 后端,非 Activity 音轨

转载 作者:行者123 更新时间:2023-12-03 00:29:37 26 4
gpt4 key购买 nike

我使用soloud 作为音频库,带有用于播放的opensles 后端。一切似乎都运行良好,但只有 9/10 次。在那些半罕见的情况下,启动似乎很正常,但应用程序没有音频。尝试更改 Activity 应用程序的音量会调高铃声音量(而不是媒体音量)。 “Fliger”输出为我的应用显示了这一点:

在职的:

Output thread 0xf2540000 type 0 (MIXER):
Thread name: AudioOut_6
I/O handle: 6
TID: 31533
Standby: no
Sample rate: 48000 Hz
HAL frame count: 960
HAL format: 0x1 (pcm16)
HAL buffer size: 3840 bytes
Channel count: 2
Channel mask: 0x00000003 (front-left, front-right)
Format: 0x1 (pcm16)
Frame size: 4 bytes
Pending config events: none
Output device: 0x3 (EARPIECE|SPEAKER)
Input device: 0 (NONE)
Audio source: 0 (default)
Normal frame count: 960
Last write occurred (msecs): 7
Total writes: 858683
Delayed writes: 0
Blocked in write: yes
Suspend count: 0
Sink buffer : 0xf59e4000
Mixer buffer: 0xf27f6000
Effect buffer: 0xf27e4000
Fast track availMask=0xfe
AudioStreamOut: 0xf5982e70 flags 0x2 (PRIMARY)
Thread throttle time (msecs): 12438
AudioMixer tracks: 0x0000000b
FastMixer not initialized
Stream volumes in dB: 0:-24, 1:-19, 2:-22, 3:-22, 4:-22, 5:-22, 6:0, 7:-6, 8:-19, 9:-96, 10:-22, 11:0, 12:0
Normal mixer raw underrun counters: partial=0 empty=0
3 Tracks of which 1 are active
Name Active Client Type Fmt Chn mask Session fCount S F SRate L dB R dB Server Main buf Aux Buf Flags UndFrmCnt
0 no 31508 1 00000001 00000003 2643 24000 S 1 48000 0 0 00008BAB 0xf59e4000 0x0 0x601 725
1 no 1480 1 00000001 00000003 2801 10081 S 1 44100 -inf -inf 00002761 0xf59e4000 0x0 0x600 0
3 yes 903 3 00000001 00000003 2824 1924 A 3 48000 0 0 00032A00 0xf59e4000 0x0 0x000 0
0 Effect Chains

splinter 的:
Output thread 0xf2540000 type 0 (MIXER):
Thread name: AudioOut_6
I/O handle: 6
TID: 31533
Standby: yes
Sample rate: 48000 Hz
HAL frame count: 960
HAL format: 0x1 (pcm16)
HAL buffer size: 3840 bytes
Channel count: 2
Channel mask: 0x00000003 (front-left, front-right)
Format: 0x1 (pcm16)
Frame size: 4 bytes
Pending config events: none
Output device: 0x3 (EARPIECE|SPEAKER)
Input device: 0 (NONE)
Audio source: 0 (default)
Normal frame count: 960
Last write occurred (msecs): 141220
Total writes: 858467
Delayed writes: 0
Blocked in write: no
Suspend count: 0
Sink buffer : 0xf59e4000
Mixer buffer: 0xf27f6000
Effect buffer: 0xf27e4000
Fast track availMask=0xfe
AudioStreamOut: 0xf5982e70 flags 0x2 (PRIMARY)
Thread throttle time (msecs): 12428
AudioMixer tracks: 0x0000000b
FastMixer not initialized
Stream volumes in dB: 0:-4.7, 1:-19, 2:-22, 3:-22, 4:-22, 5:-22, 6:0, 7:-6, 8:-19, 9:-96, 10:-22, 11:0, 12:0
Normal mixer raw underrun counters: partial=0 empty=0
3 Tracks of which 0 are active
Name Active Client Type Fmt Chn mask Session fCount S F SRate L dB R dB Server Main buf Aux Buf Flags UndFrmCnt
0 no 31508 1 00000001 00000003 2643 24000 S 1 48000 0 0 00008BAB 0xf59e4000 0x0 0x601 725
1 no 1480 1 00000001 00000003 2801 10081 S 1 44100 -inf -inf 00002761 0xf59e4000 0x0 0x600 0
3 no 748 3 00000001 00000003 2813 1924 S 1 48000 0 0 00000B40 0xf59e4000 0x0 0x600 2886
0 Effect Chains

我尝试过使用缓冲区大小(遵循 android 低延迟指南),但没有效果。

我知道这很难,但有人知道要看什么吗?

最佳答案

嗯,我发现了问题:)
线程启动速度很慢,并且在线程池启动之前触发了 sles 回调。

关于android - Soloud + OpenSLES 后端,非 Activity 音轨,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/51395829/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com