goxr3plus / java-stream-player

🌌Java Advanced Audio Controller Library (WAV, AU, AIFF, MP3, OGG VORBIS, FLAC, MONKEY's AUDIO and SPEEX audio formats )
GNU General Public License v3.0
147 stars 33 forks source link

Data source #44

Closed HelgeStenstrom closed 5 years ago

HelgeStenstrom commented 5 years ago

The old Object dataSource in the StreamPlayer has been replaced with three new classes and an interface. There were several "instanceof" tests in the code on the dataSource object, these are no longer needed, except in one place (the method which selects which class implementing DataSource to use).

Several methods have become much simpler.

The code is tested with File as the input type, but not with URL or InputStream as input type. But the methods in the three new classes implementing DataSource are extremely similar, so there is no reason to worry about the URL or InputStream implementations. Unless they had problems already before this refactoring.

Suggestion: Look through the several commits, to see how I have made the changes i steps. The squash them for the merge. I believe there is a choice in GitHub to squash-and-merge, although I cannot see it now before I have created the pull request.

HelgeStenstrom commented 5 years ago

"Merge pull request" can be changed to "Squash and merge". I think there will be fewer commits in the history log then, which is good, because no one is interested in all my small steps to the final result.

goxr3plus commented 5 years ago

O my gosh i had a total look in the repository today and it's becoming a new project :) Far from what I originally made hahaha

goxr3plus commented 5 years ago

I saw the changes I agree with braking it into 3 main parts for File, URL and I put Stream.

I will merge. No problem for many commits I am from mobile and can't see the option squash and commit

goxr3plus commented 5 years ago

OUH I THINK I found the squash :)

goxr3plus commented 5 years ago

Wow it made a single commit pointing to the pull request, pretty interesting I have to admit

goxr3plus commented 5 years ago

Hey have you ever done mobile development i am playing with Google Flutter recently :)?

HelgeStenstrom commented 5 years ago

No, nothing mobile.