No sound on Huawei P20

I’m using FMOD 2.00.05 library on Huawei P20 and no sound can be played.
I’ve tried sounds with samplerate 48000 / 41400 / 32000 and same thing, no sound.

the error is
2019-11-15 00:35:32.510 3196-3223/? W/AudioTrack: AUDIO_OUTPUT_FLAG_FAST denied by client; transfer 3, track 48000 Hz, output 48000 Hz

2019-11-15 00:35:32.511 723-2254/? I/hash_map_utils: key: ‘mode’ value: ‘’

2019-11-15 00:35:32.511 723-2254/? D/HuaweiAudioFlinger: AudioException do not check.now is not communication state!

2019-11-15 00:35:32.512 723-2254/? D/AudioFlinger: event 162

2019-11-15 00:35:32.512 723-2254/? W/AudioFlinger: createTrack_l(): mismatch between requested flags (00000100) and output flags (00000002)

From what I’ve read the eror “AUDIO_OUTPUT_FLAG_FAST denied by client” appear when the phone doesn’t support “android fast audio path” . But FMOD is implemented using this type of support.

more details in this log:

2019-11-15 00:35:32.507 3196-3223/? D/AAudio: AAudioStreamBuilder_openStream() called ----------------------------------------
2019-11-15 00:35:32.507 3196-3223/? D/AAudio: AudioStreamBuilder(): mmapPolicy = 1, mapExclusivePolicy = 1
2019-11-15 00:35:32.508 3196-3223/? I/AAudio: AudioStream::open() rate = 0, channels = 0, format = 0, sharing = 1, dir = OUTPUT
2019-11-15 00:35:32.508 3196-3223/? I/AAudio: AudioStream::open() device = 0, perfMode = 12, callbackFrames = 0
2019-11-15 00:35:32.508 3196-3223/? D/AAudio: AudioStreamTrack::open(), request notificationFrames = 0, frameCount = 0
2019-11-15 00:35:32.508 723-2254/? D/AudioFlinger: event 162
2019-11-15 00:35:32.509 723-2254/? I/APM_AudioPolicyManager: getOutputForDevice() returns output 13
2019-11-15 00:35:32.509 723-2254/? I/APM_AudioPolicyManager: getOutputForAttr() returns output 13 stream 3
2019-11-15 00:35:32.510 3196-3223/? W/AudioTrack: AUDIO_OUTPUT_FLAG_FAST denied by client; transfer 3, track 48000 Hz, output 48000 Hz
2019-11-15 00:35:32.511 723-2254/? I/hash_map_utils: key: ‘mode’ value: ‘’
2019-11-15 00:35:32.511 723-2254/? D/HuaweiAudioFlinger: AudioException do not check.now is not communication state!
2019-11-15 00:35:32.512 723-2254/? D/AudioFlinger: event 162
2019-11-15 00:35:32.512 723-2254/? W/AudioFlinger: createTrack_l(): mismatch between requested flags (00000100) and output flags (00000002)
2019-11-15 00:35:32.512 723-2254/? I/AudioMixer: Pid:723 add track (3)
2019-11-15 00:35:32.512 723-2254/? D/AudioFlinger: DevSched: uid is 10306, factor is 1.000000
2019-11-15 00:35:32.513 3196-3223/? D/AudioTrack: OFFLOAD 0,mNotificationFrames 0,mStreamType =3,mOriginalSampleRate 48000,mAfSampleRate 48000,mTransfer 3
2019-11-15 00:35:32.513 3196-3223/? D/AudioTrack: Client defaulted notificationFrames to 962 for frameCount 1924
2019-11-15 00:35:32.513 1725-1838/? D/AudioState: SESSION_ID_NEW, containsKey, pid: 3196, sessionId: 609,uid: 10306
2019-11-15 00:35:32.514 723-2254/? D/AudioFlinger: event 162
2019-11-15 00:35:32.514 3196-3223/? W/AAudio: AudioStreamTrack::open() sampleRate changed from 0 to 48000
2019-11-15 00:35:32.515 3196-3223/? W/AAudio: AudioStreamTrack::open() flags changed from 0x00000104 to 0x00000000
2019-11-15 00:35:32.515 3196-3223/? W/AAudio: AudioStreamTrack::open() perfMode changed from 12 to 10
2019-11-15 00:35:32.515 3196-3223/? D/AAudio: AAudioStreamBuilder_openStream() returns 0 = AAUDIO_OK for (0x749d299200) ----------------
2019-11-15 00:35:32.515 3196-3223/? D/AAudio: AAudioStream_close(0x749d299200)
2019-11-15 00:35:32.515 723-2254/? I/AudioMixer: Pid:723 deleteTrackName(3)
2019-11-15 00:35:32.515 723-723/? D/AudioFlinger: event 163
2019-11-15 00:35:32.515 723-960/? V/APM_AudioPolicyManager: releaseOutput() 13
2019-11-15 00:35:32.515 3196-3223/? D/AAudio: AAudioStreamBuilder_openStream() called ----------------------------------------
2019-11-15 00:35:32.515 3196-3223/? D/AAudio: AudioStreamBuilder(): mmapPolicy = 1, mapExclusivePolicy = 1
2019-11-15 00:35:32.516 3196-3223/? I/AAudio: AudioStream::open() rate = 0, channels = 0, format = 0, sharing = 1, dir = OUTPUT
2019-11-15 00:35:32.516 3196-3223/? I/AAudio: AudioStream::open() device = 0, perfMode = 12, callbackFrames = 0
2019-11-15 00:35:32.516 3196-3223/? D/AAudio: AudioStreamTrack::open(), request notificationFrames = -8, frameCount = 0
2019-11-15 00:35:32.516 723-2254/? D/AudioFlinger: event 162
2019-11-15 00:35:32.517 723-2254/? I/APM_AudioPolicyManager: getOutputForDevice() returns output 13
2019-11-15 00:35:32.517 723-2254/? I/APM_AudioPolicyManager: getOutputForAttr() returns output 13 stream 3
2019-11-15 00:35:32.517 723-2254/? I/hash_map_utils: key: ‘mode’ value: ‘’
2019-11-15 00:35:32.518 723-2254/? D/HuaweiAudioFlinger: AudioException do not check.now is not communication state!
2019-11-15 00:35:32.518 723-2254/? D/AudioFlinger: event 162
2019-11-15 00:35:32.518 723-2254/? W/AudioFlinger: createTrack_l(): mismatch between requested flags (00000104) and output flags (00000002)
2019-11-15 00:35:32.518 723-2254/? I/AudioMixer: Pid:723 add track (3)
2019-11-15 00:35:32.518 723-2254/? D/AudioFlinger: DevSched: uid is 10306, factor is 1.000000
2019-11-15 00:35:32.519 3196-3223/? W/AudioTrack: AUDIO_OUTPUT_FLAG_FAST denied by server; frameCount 7680 -> 7680
2019-11-15 00:35:32.519 3196-3223/? D/AudioTrack: OFFLOAD 0,mNotificationFrames -8,mStreamType =3,mOriginalSampleRate 48000,mAfSampleRate 48000,mTransfer 1
2019-11-15 00:35:32.519 3196-3223/? D/AudioTrack: Client defaulted notificationFrames to 480 for frameCount 7680
2019-11-15 00:35:32.519 1725-1838/? D/AudioState: SESSION_ID_NEW, containsKey, pid: 3196, sessionId: 617,uid: 10306
2019-11-15 00:35:32.520 723-2254/? D/AudioFlinger: event 162
2019-11-15 00:35:32.521 3196-3223/? W/AAudio: AudioStreamTrack::open() sampleRate changed from 0 to 48000
2019-11-15 00:35:32.521 3196-3223/? W/AAudio: AudioStreamTrack::open() flags changed from 0x00000104 to 0x00000000
2019-11-15 00:35:32.521 3196-3223/? W/AAudio: AudioStreamTrack::open() perfMode changed from 12 to 10
2019-11-15 00:35:32.521 3196-3223/? D/AAudio: AAudioStreamBuilder_openStream() returns 0 = AAUDIO_OK for (0x749d299200) ----------------
2019-11-15 00:35:32.525 3196-3223/? D/AAudio: AAudioStream_requestStart(0x749d299200)
2019-11-15 00:35:32.525 723-2254/? I/APM_AudioPolicyManager: startOutput() output 13, stream 3, session 617
2019-11-15 00:35:32.525 723-2254/? D/APM_AudioPolicyManager: event 164
2019-11-15 00:35:32.526 723-2254/? V/APM_AudioPolicyManager: setBeaconMute(1) mBeaconMuteRefCount=1 mBeaconPlayingRefCount=0
2019-11-15 00:35:32.526 723-2254/? V/APM_AudioPolicyManager: selectOutputForMusicEffects activeOnly 1 outputs[0] flags 0x00000002
2019-11-15 00:35:32.526 723-2254/? V/APM_AudioPolicyManager: selectOutputForMusicEffects selected output 13
2019-11-15 00:35:32.526 723-2254/? I/APM_AudioPolicyManager: getNewOutputDevice() selected device 2
2019-11-15 00:35:32.526 723-2254/? I/APM_AudioPolicyManager: setOutputDevice() device 0x0002 delayMs 0 force 0
2019-11-15 00:35:32.526 723-2254/? V/APM_AudioPolicyManager: setOutputDevice() prevDevice 0x0002
2019-11-15 00:35:32.526 723-2254/? I/APM_AudioPolicyManager: setOutputDevice() setting same device 0x0002 or null device
2019-11-15 00:35:32.526 723-2254/? D/APM::Gains: volIndexToDb sUseVolCurveCust true
2019-11-15 00:35:32.526 723-2254/? D/APM_AudioPolicyManager: set streamType 3, volume = 8, device = 2 for sws
2019-11-15 00:35:32.526 723-2254/? D/APM::Gains: volIndexToDb sUseVolCurveCust true
2019-11-15 00:35:32.528 723-959/? E/stereoWidening_frame: sws is turned on
2019-11-15 00:35:32.528 660-660/? I/audio_hw_effect: offload effect sws state: [1]
2019-11-15 00:35:32.529 723-2254/? I/APM_AudioPolicyManager: checkOutputForStrategy() getDeviceForStrategy strategy=3 newDevice=2 oldDevice=2
2019-11-15 00:35:32.529 1725-1838/? I/PGServer: report state:2 event type:1 pid:3196 uid:10306 pkg:null to pid: 1134
2019-11-15 00:35:32.530 1725-1838/? I/PGServer: report state:2 event type:1 pid:3196 uid:10306 pkg:null to pid: 1725
2019-11-15 00:35:32.530 1725-1838/? D/AudioState: auido type:out state:start pid:3196 uid:10306

I cannot see any FMOD logging in there, do you have a log file with any/more FMOD information?

The issue was resolved after changing the initialization way

FROM

FmodSfx::FmodSfx(FMOD_SYSTEM* pSystem, FileStream* pFileStream, FMOD_SOUND_FORMAT format, bool bIsStream)
{
	m_pSound = NULL;
	
	FMOD_RESULT result;

#ifdef TARGET_ANDROID
		char pPath[1000] = {0};
		sprintf(pPath, "file:///android_asset/%s", "sound1");
	
		result = FMOD_System_CreateSound(pSystem, pPath, FMOD_LOOP_NORMAL | FMOD_CREATESTREAM, 0, &m_pSound);
#else
		result = FMOD_System_CreateSound(pSystem, pFileStream->GetFilePath(), FMOD_CREATESTREAM | FMOD_LOOP_NORMAL, 0, &m_pSound);
#endif
}

TO

FmodSfx::FmodSfx(FMOD::System* pSystem, FileStream* pFileStream, FMOD_SOUND_FORMAT format, bool bIsStream)
{
	m_pSound = NULL;
	
	FMOD_RESULT result;

#ifdef TARGET_ANDROID
		char pPath[1000] = {0};
		sprintf(pPath, "file:///android_asset/%s", "sound1");

		result = pSystem->createSound(pPath, FMOD_DEFAULT | FMOD_LOOP_NORMAL, 0, &m_pSound);
#else
		result = pSystem->createSound(pFileStream->GetFilePath(), FMOD_DEFAULT | FMOD_LOOP_NORMAL, 0, &m_pSound);
#endif
}

thank you for your support