Playing audio files in Android logs Strange error

I use this method to play sounds in my assets

public void PlaySound(String sound_name) { try { if (mPlayer != null) { if (mPlayer.isPlaying()) { mPlayer.stop(); } mPlayer.release(); } mPlayer = new MediaPlayer(); int timerSoundId; String packageName = getPackageName(); timerSoundId = getResources().getIdentifier( sound_name , "raw" , packageName ); AssetFileDescriptor descriptor = getResources().openRawResourceFd(timerSoundId); mPlayer.setDataSource(descriptor.getFileDescriptor(), descriptor.getStartOffset(), descriptor.getLength()); descriptor.close(); mPlayer.prepare(); mPlayer.setVolume(1f, 1f); mPlayer.start(); } catch (Exception e) { } } 

while I test the application on the device, whenever the sound is played, this error is printed

 07-19 11:21:55.715 1833-6093/? E/AudioPolicyService: getOutput() tid 6093 ++ 07-19 11:21:55.715 1833-6093/? E/AudioPolicyService: getOutput() tid 6093 -- 07-19 11:21:55.715 1833-6093/? E/AudioPolicyService: getOutput() tid 6093 ++ 07-19 11:21:55.715 1833-6093/? E/AudioPolicyService: getOutput() tid 6093 -- 07-19 11:21:55.715 1833-6093/? E/AudioPolicyService: getOutput() tid 6093 ++ 07-19 11:21:55.715 1833-6093/? E/AudioPolicyService: getOutput() tid 6093 -- 07-19 11:21:55.715 1833-6093/? E/AudioPolicyService: getOutput() tid 6093 ++ 07-19 11:21:55.715 1833-6093/? E/AudioPolicyService: getOutput() tid 6093 -- 07-19 11:21:55.715 1833-6093/? E/AudioPolicyManagerBase: unknown stream type 07-19 11:21:55.715 1833-6093/? E/AudioPolicyManagerBase: unknown stream type 07-19 11:21:55.715 1833-6093/? E/AudioPolicyManagerBase: unknown stream type 07-19 11:21:55.715 1833-6093/? E/AudioPolicyManagerBase: unknown stream type 07-19 11:21:55.715 1833-6093/? E/AudioPolicyManagerBase: unknown stream type 07-19 11:21:55.715 1833-6093/? E/AudioPolicyManagerBase: unknown stream type 07-19 11:21:55.715 1833-6093/? E/AudioPolicyManagerBase: unknown stream type 07-19 11:21:55.715 1833-6093/? E/AudioPolicyManagerBase: unknown stream type 07-19 11:21:55.715 1833-6093/? E/AudioPolicyManagerBase: unknown stream type 07-19 11:21:55.715 1833-6093/? E/AudioPolicyManagerBase: unknown stream type 

The application does not crash, and I did not find any problems. I thought the reason would be the audio file format. They were wav. but then I changed them to mp3, there is still no difference. Music plays, but leaves these lines of the magazine behind it.

Should I worry about this? Or just ignore it? Any suggestion would be appreciated ...

+4
source share

Source: https://habr.com/ru/post/1492255/


All Articles