Giter Club home page Giter Club logo

khi-player's Introduction

Khi Player Icon

Edit:

-Improved performance and stability

-Addressed memory leaks and removed unnecessary usage of IDisposable interface and many instances of forced collection of Garbage Collector that, due to their nature as stop-gaps, were slowing down the program

-Reworked and restructured the classes, and separated them from the main program

-Separated the UI functionalities and data processes even further

-Many of the functions now work asynchronously

-Retouched code formatting, removed unnecessary spaces, and improved readability

-Improved the Seek bar's functionality and improved it's performance and accuracy

-Improved and Debugged codes related to playback

-Some problems with the UI's resistibility were addressed


How it Began:

This is not actually the first version, more like the 20-something-th version but it is the first that I'm sharing hence v1.

I started this as I was learning how to read and write txt files using code which turned into a simple idea for a pseudo-database (sort of a long shot but I'll go with that for now); as I changed different parts and learned new things, thanks to the frustration that writing this was causing me, I'd go back and rewrite the older parts.

For example, the database was at first a simple txt file with the path of the files, then I included more details and shaped it up but then I hit a wall; I had trouble differentiating files from each other so I came up with an idea to use sth like "|" and "|" for every piece of info that I was using, it made some things easier but other stuff harder in addition to producing other sorts of problems.

Long story short, I discovered XML and used it as a sort of database and stuck with it. There are many aspects that still need improving, especially regarding features, making use of async and more importantly, regarding errors since I did not use try catch in most parts but tried to eliminate their production and then did not have much time to go back and do it.

Anyhow, I'm happy with how it turned out, and I'll of course update, debug and develop it as I go on but since I'm short on free time and have to dedicate my time to other matters, I cannot do that now, so here we are.

If you like the idea of this music player lemme know, it will make me extremely happy :) and if you find a bug (which you surely will) or have some suggestions regarding how I could change some parts, do let me know

aha almost forgot, you can drag and drop your music files, add an entire folder or add songs using the provided buttons, they are easy to find and use

PS: Khi means boar in my language, the name is a sort of an inside joke and I decided to stick with it :)

Khi Player - sample

Khi Player - sample 2

khi-player's People

Contributors

rushakh avatar

Stargazers

Ján Bočínec avatar

Watchers

 avatar

khi-player's Issues

Remove unnecessary optimizations

The codebase looks like you learned to code from books written 10-years ago or came from a lower level language mind-set.

The C# compiler optimizes all the things you're trying to do. By manually calling the garbage collector, you're actually at best, slowing things down.

You also don't need to null out everything. The extreme null handling here is crazy! Rozlinator catches like 600 warnings and 500 suggestions. All based on inefficient, worthless null handling.

You have to look at dates when it comes to code optimization suggestions online. Something you need to remember about C#, it doesn't run what you type. The compiler takes what you type and creates performant code from it. All the hand curated "optimizations" get deleted by the compiler. C# is about readability.

Also, if you're making things null because you WANT a crash/catch, throw an error. Don't make it nullable.

I'm sorry you tried this 20 times. It looks like a labour of love. But you've been labouring in the completely wrong direction.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.