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

Add support for WMA audio playback #58

Open
adarsh1001 opened this issue Nov 30, 2023 · 8 comments
Open

Add support for WMA audio playback #58

adarsh1001 opened this issue Nov 30, 2023 · 8 comments
Labels
feature-request New feature or request wontfix This will not be worked on

Comments

@adarsh1001
Copy link

Is your feature request related to a problem? Please describe.
Currently, the player is unable to play .wma files.

Describe the solution you'd like
For the player to be able to play .wma audio files.

Describe alternatives you've considered
The alternative is to either convert .wma to .mp3 or use a different audio player that supports .wma.

Additional context
Used the Material Files app to navigate to the .wma file and selected DialogMusicPlayer to play it.

@VishnuSanal
Copy link
Owner

hi @adarsh1001, thanks for reaching out! I tried to play WMA a file & it worked fine. 🤔 would this be something similar to #57? can you please confirm after trying with different files & file managers?

(PS: I did not have a WMA file, I converted an M4A file to WMA using cloud convert.)

@VishnuSanal VishnuSanal added issue-discussion Should be discussed over! feature-request New feature or request labels Dec 1, 2023
@adarsh1001
Copy link
Author

Interesting. I tried with Simple File Manager and Little File Manager as well, same result. WMA files don't play, rather crash the DialogMusicPlayer.

Can you try playing the sample WMA file from here? Maybe the conversion had something to do in your case Also, which file manager did you use?

@adarsh1001
Copy link
Author

Video of the issue:

screen-20231201-211947.mp4

@VishnuSanal
Copy link
Owner

Can you try playing the sample WMA file from here? Maybe the conversion had something to do in your case.

well, this is getting interesting! I tried with three of 'em & they played absolutely fine.

Also, which file manager did you use?

I used Amaze File Manager & Material Files

oh, and you are getting a crash. can you get me the logs? :D you can use https://www.f-droid.org/packages/com.f0x1d.logfox/

also, which android version are you on? on which directory are the music files located?

@adarsh1001
Copy link
Author

Sure, let me capture the logs and get back to you. Not near a PC right now so won't be able to grant access to logfox via ADB 😅

About device info, I'm on Android 13 on the Nothing Phone (2). Using the latest v2.1.2 of the DMP.

@adarsh1001
Copy link
Author

adarsh1001 commented Dec 1, 2023

Hey @VishnuSanal, so followed the same steps as in the video shared. Here are the logs:

FATAL EXCEPTION: main
Process: phone.vishnu.dialogmusicplayer, PID: 26001
java.lang.NullPointerException: Attempt to read from field 'android.support.v4.media.MediaMetadataCompat q3.a.b' on a null object reference in method 'android.app.Notification phone.vishnu.dialogmusicplayer.MediaPlaybackService.c()'
	at phone.vishnu.dialogmusicplayer.MediaPlaybackService.c(SourceFile:146)
	at q3.k.onCompletion(SourceFile:11)
	at android.media.MediaPlayer$EventHandler.handleMessage(MediaPlayer.java:3542)
	at android.os.Handler.dispatchMessage(Handler.java:106)
	at android.os.Looper.loopOnce(Looper.java:227)
	at android.os.Looper.loop(Looper.java:327)
	at android.app.ActivityThread.main(ActivityThread.java:7995)
	at java.lang.reflect.Method.invoke(Native Method)
	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:548)
	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:942)

crash-phone-vishnu-dialogmusicplayer-01_12-22-15-46_746.zip

@VishnuSanal
Copy link
Owner

oh, damn, didn't I comment here?! :( I think I did, maybe that didn't get registered? IDK, now I am typing it from memory.

MediaPlayer doesn't support WMA file by default (ref).

Note that a particular mobile device might support additional formats or file types that are not listed in these tables.

this must be the reason why my device played WMA files & your device didn't.

and, talking about the for this issue: one is migration to ExoPlayer & that is not on my roadmap anytime soon. another is to implement a MediaCodec for WMA, which (I presume) would make the app heavy, that I do not prefer personally. I think this stays a wontfix issue for now.

@VishnuSanal VishnuSanal added wontfix This will not be worked on and removed issue-discussion Should be discussed over! labels Dec 15, 2023
@adarsh1001
Copy link
Author

Ah I see, I was surprised why it wasn't playing on mine while it was on yours. Not the first OEM-related discrepancy on Android huh 😅

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature-request New feature or request wontfix This will not be worked on
Projects
None yet
Development

No branches or pull requests

2 participants