barsoosayque / libgdx-oboe

🎶 libGDX audio replacement for Android (API 16+) built on top of Oboe.
MIT License
54 stars 10 forks source link

Allow Absolute, Local and External FileTypes #19

Closed Kurante2801 closed 1 year ago

Kurante2801 commented 1 year ago

I've noticed newMusic function calls file.file() when not using FileType.Internal, which returns null on AndroidFileHandle

barsoosayque commented 1 year ago

Thanks for the PR ! Hmm, I wonder why it returns null, since I copied this piece of code directly from DefaultAndroidAudio. Is it the same for vanilla libGDX audio ? And as for the comment, doesn't AndroidFileHandle actually implement it ? I'm a bit confused

Kurante2801 commented 1 year ago

AndroidFileHandle implements it for Local and Externals (in the super call), but DefaultAndroidFiles constructs the AndroidFileHandle without making a file variable when calling Gdx.files.absolute so it returns null when calling file.file()

barsoosayque commented 1 year ago

Alright, seems good enough. Though I still believe it should be a part of upstream in such case, but for now, I think it's ok to have this in the lib