Commit Graph

2248 Commits

Author SHA1 Message Date
Bryan Schumaker 38c074d898 build: Improve aliasing for tests
scons tests - Compile all tests
scons tests/basic - Compile basic tests
scons tests/basic/print - Compile text printing test

Signed-off-by: Bryan Schumaker <bjschuma@gmail.com>
2014-04-06 19:56:51 -04:00
Bryan Schumaker d8c8ea1bbf Design: Put in idle queue information
This is needed for scheduling files to load later.

Signed-off-by: Bryan Schumaker <bjschuma@gmail.com>
2014-04-06 19:56:51 -04:00
Bryan Schumaker f75ba5a2b8 tests: Add a basic test
This test checks for the version.h file and then compiles it with and
without debugging enabled.

Signed-off-by: Bryan Schumaker <bjschuma@gmail.com>
2014-04-06 19:56:51 -04:00
Bryan Schumaker 101648dc0a Remove old include files
I'm going to replace them with new files for Ocarina 6.

Signed-off-by: Bryan Schumaker <bjschuma@gmail.com>
2014-04-06 19:56:51 -04:00
Bryan Schumaker 15df2ed075 Remove newgui
I'm not going to use this code anymore.

Signed-off-by: Bryan Schumaker <bjschuma@gmail.com>
2014-04-06 19:56:51 -04:00
Bryan Schumaker 04d4aca772 Design: Add version and printing info
Signed-off-by: Bryan Schumaker <bjschuma@gmail.com>
2014-04-06 19:56:51 -04:00
Bryan Schumaker 0b2fc03f19 design: Rework playlists, add filtering
Signed-off-by: Bryan Schumaker <bjschuma@gmail.com>
2014-04-06 19:56:51 -04:00
Bryan Schumaker b786b44a49 design: Add in gstreamer thoughts
Because a music player should be able to play music :)

Signed-off-by: Bryan Schumaker <bjschuma@gmail.com>
2014-04-06 19:56:51 -04:00
Bryan Schumaker 310c9ad395 Design: Create a preferences namespace
This will be used to store various values for the user.

Signed-off-by: Bryan Schumaker <bjschuma@gmail.com>
2014-04-06 19:56:51 -04:00
Bryan Schumaker 5312853b86 Design: Create a File class
This class will manage save files so paths don't need to be resolved in
multiple places.  I'll also use it for reading and writing with version
information.

Signed-off-by: Bryan Schumaker <bjschuma@gmail.com>
2014-04-06 19:56:51 -04:00
Bryan Schumaker fc40a9f77f Design: Update groups
Groups now use an index to manage their data.

Signed-off-by: Bryan Schumaker <bjschuma@gmail.com>
2014-04-06 19:56:51 -04:00
Bryan Schumaker 5a7fcdb305 Design: Create an index class
This will be used for groups, both stored and temporary.

Signed-off-by: Bryan Schumaker <bjschuma@gmail.com>
2014-04-06 19:56:51 -04:00
Bryan Schumaker 08b0513578 Improve on file format text
I think it's cleaner now.

Signed-off-by: Bryan Schumaker <bjschuma@gmail.com>
2014-04-06 19:56:51 -04:00
Bryan Schumaker 59f08cfc51 Design: Update library information
I decided to put the library into a namespace to keep the code clean.  I
also added an update algorithm and made minor naming changes.

Signed-off-by: Bryan Schumaker <bjschuma@gmail.com>
2014-04-06 19:56:51 -04:00
Bryan Schumaker 2ea1ea8d26 Database design
I've decided to make my own "database" tailored for things I need to do.

Signed-off-by: Bryan Schumaker <bjschuma@gmail.com>
2014-04-06 19:56:51 -04:00
Bryan Schumaker 80e00dd914 Design: Rethink groups and add in future ideas
I renamed "tags" to "groups" to avoid confusion with ID3 tags.  I also
thought out a better plan for eventually implementing user defined tags
so that I can build up to them with testing along the way.  With any
luck, I won't overwhelm myself with features =).

Signed-off-by: Bryan Schumaker <bjschuma@gmail.com>
2014-04-06 19:56:51 -04:00
Bryan Schumaker 2b145f2dab Update design
I remembered that I don't like SQL, so managing my own library database
is probably better.

Signed-off-by: Bryan Schumaker <bjschuma@gmail.com>
2014-04-06 19:56:51 -04:00
Bryan Schumaker b7ee8a0f78 design: Work on playlist design
Signed-off-by: Bryan Schumaker <bjschuma@gmail.com>
2014-04-06 19:56:51 -04:00
Bryan Schumaker e4fa2155b9 Start a design document for Ocarina 6
Up until now I've just been coding whatever I feel like without thinking
about it too much.  This time I'm actually going to come up with an
ocarina design and then implement it according to the document.  The doc
can then act as a reference for how and why things are done for future
work.

Signed-off-by: Bryan Schumaker <bjschuma@gmail.com>
2014-04-06 19:56:51 -04:00
Bryan Schumaker 7dc88a1e46 newgui: Capture key presses on the window
Signed-off-by: Bryan Schumaker <bjschuma@gmail.com>
2014-04-06 19:56:51 -04:00
Bryan Schumaker 3c60dbdbae newgui: Set a window title and icon
Signed-off-by: Bryan Schumaker <bjschuma@gmail.com>
2014-04-06 19:56:51 -04:00
Bryan Schumaker 5eb24ee04f newgui: Load the gtk builder file
Right now it's just a toplevel window.  I also added a script for
launching the new gui without needing to manually set the environment
variable.

Signed-off-by: Bryan Schumaker <bjschuma@gmail.com>
2014-04-06 19:56:50 -04:00
Bryan Schumaker f6cb19145d libsaria: Remove app name from init data
I only have one application so there is no point in having a way to
create multiple application directories.

Signed-off-by: Bryan Schumaker <bjschuma@gmail.com>
2014-04-06 19:56:50 -04:00
Bryan Schumaker 14432e216d newgui: Create and display a window
Nothing to complicated yet.

Signed-off-by: Bryan Schumaker <bjschuma@gmail.com>
2014-04-06 19:56:50 -04:00
Bryan Schumaker 78e9c744fd newgui: Start rewriting the gui
The plan is to port everything to gtkmm since using the C functions is
beginning to get annoying.  Compile the new code using `scons newgui`
for now.

Signed-off-by: Bryan Schumaker <bjschuma@gmail.com>
2014-04-06 19:56:50 -04:00
Bryan Schumaker e4d73fee48 libsaria: Rename IdleTask::run_task()
I think that just calling it run() is better.

Signed-off-by: Bryan Schumaker <bjschuma@gmail.com>
2014-04-06 19:56:50 -04:00
Bryan Schumaker 9c72e56261 libsaria: Remove idle::do_task()
It's a 2 line function that was used in only one place.  Time to remove
it and simplify the surrounding code.

Signed-off-by: Bryan Schumaker <bjschuma@gmail.com>
2014-04-06 19:56:50 -04:00
Bryan Schumaker 2f2c9cdf68 libsaria: Move idle.cpp to libsaria/
The idle queue code is all one file now, so it can exist directly in libsaria/

Signed-off-by: Bryan Schumaker <bjschuma@gmail.com>
2014-04-06 19:56:50 -04:00
Bryan Schumaker 5bc357be18 libsaria: Remove operator[] for strings
Public member variables is easier.

Signed-off-by: Bryan Schumaker <bjschuma@gmail.com>
2014-04-06 19:56:50 -04:00
Bryan Schumaker d79eefc8b2 libsaria: Remove operator[] for uint values
Public access to variables is easier.

Signed-off-by: Bryan Schumaker <bjschuma@gmail.com>
2014-04-06 19:56:50 -04:00
Bryan Schumaker 29718ceb12 libsaria: Remove operator[] for int values
Public access to these variables is easier.

Signed-off-by: Bryan Schumaker <bjschuma@gmail.com>
2014-04-06 19:56:50 -04:00
Bryan Schumaker 56dd54f114 libsaria: Remove operator[] for Track.banned
Public access to this variable is simpler and probably more efficient.

Signed-off-by: Bryan Schumaker <bjschuma@gmail.com>
2014-04-06 19:56:50 -04:00
Bryan Schumaker aaf1205078 libsaria: Make some track variables public
This should be easier than making a bunch of getters or setters.

Signed-off-by: Bryan Schumaker <bjschuma@gmail.com>
2014-04-06 19:56:50 -04:00
Bryan Schumaker 05bbad5444 libsaria: Resizing a vector invalidates pointers
I was keeping a vector of objects, and then pass pointers to these
objects around everywhere.  HOWEVER, when vectors are resized they
allocate new memory and copy things over invalidating iterators and
pointers to the original objects.  This can cause memory corruption
issues when I try to use a pointer to an object that no longer exists.

The simple solution?  Allocate tracks dynamically and then store the
pointer in the library path.

Signed-off-by: Bryan Schumaker <bjschuma@gmail.com>
2014-04-06 19:56:50 -04:00
Bryan Schumaker c094f9791f libsaria: Set correct library version
Otherwise we'll only read the first 124-ish songs and then stop...

Signed-off-by: Bryan Schumaker <bjschuma@gmail.com>
2014-04-06 19:56:50 -04:00
Bryan Schumaker 9043183807 libsaria: Remove old idle task stuff
I handle the idle task stuff inside the idle layer, hiding it from
everything else.

Signed-off-by: Bryan Schumaker <bjschuma@gmail.com>
2014-04-06 19:56:50 -04:00
Bryan Schumaker 1ac51775c3 libsaria: Remove ReadTask
I replaced it with the generic idle task I just created.

Signed-off-by: Bryan Schumaker <bjschuma@gmail.com>
2014-04-06 19:56:50 -04:00
Bryan Schumaker 5244fe9605 libsaria: Begin work on a new generic idle task
I want to remove the various idle task types that have built up and
replace everything with a single idle type.  I also want the idle layer
to be the only place new tasks are allocated.

Signed-off-by: Bryan Schumaker <bjschuma@gmail.com>
2014-04-06 19:56:50 -04:00
Bryan Schumaker b6e0d6dd58 libsaria: Remove my custom linked list class
Now that I'm using vectors for everything I don't need to maintain my
own class.  Nothing uses it now, so it can be safely removed.

Signed-off-by: Bryan Schumaker <bjschuma@gmail.com>
2014-04-06 19:56:50 -04:00
Bryan Schumaker 36e9995bb9 libsaria: Use vectors to store the track list
For each library path, I replace the linked list with a vector allowing
me to easily index into the list to find tracks.

Signed-off-by: Bryan Schumaker <bjschuma@gmail.com>
2014-04-06 19:56:50 -04:00
Bryan Schumaker 592a924881 libsaria: Change the path_list to a vector
For easier lookups.

Signed-off-by: Bryan Schumaker <bjschuma@gmail.com>
2014-04-06 19:56:50 -04:00
Bryan Schumaker 8f7a610d6d libsaria: Remove DataState optimization
It made sense at the time, but I'm not convinced the added complexity is
actually worth it.

Signed-off-by: Bryan Schumaker <bjschuma@gmail.com>
2014-04-06 19:56:50 -04:00
Bryan Schumaker b7a21789b6 libsaria: Pass around more const strings
This allows me to pass them by reference, it should be a bit more
efficient.

Signed-off-by: Bryan Schumaker <bjschuma@gmail.com>
2014-04-06 19:56:50 -04:00
Bryan Schumaker 0b9beac1c3 ocarina: Include bash completion script as part of build
I can't believe I forgot this...

Signed-off-by: Bryan Schumaker <bjschuma@gmail.com>
2014-04-06 19:56:49 -04:00
Bryan Schumaker 8f10d75fac Ocarina 5.11.1
- Pass escaped URIs to gstreamer.
- Fix `scons release` for bugfix releases.
2012-12-06 19:36:21 -05:00
Bryan Schumaker fa812ece74 Correct `scons release` for bugfix releases
This corrects the package build to look for a tarbal named
"ocarina-5.11.1.tar.gz" instead of "ocarina-5.11.tar.gz"

Signed-off-by: Bryan Schumaker <bjschuma@gmail.com>
2012-12-06 19:35:54 -05:00
Bryan Schumaker 9370ef34a1 libsaria: Escape filepaths passed to gstreamer
Otherwise songs might error out part way through playing and skip to
something else.  It doesn't make sense and I wish I knew why :(

Signed-off-by: Bryan Schumaker <bjschuma@gmail.com>
2012-12-06 19:28:43 -05:00
Bryan Schumaker b2226d926e Ocarina 5.11 2012-11-22 10:14:34 -05:00
Bryan Schumaker a4b154765f libsaria: Send a PLAYLIST_CHANGED notification when loading
To tell the UI what gui settings need to be changed.

Signed-off-by: Bryan Schumaker <bjschuma@gmail.com>
2012-11-22 09:50:06 -05:00
Bryan Schumaker 98934ff42d libsaria: Move the rest of the deck code over
I also clean up the garbage collect code a bit.

Signed-off-by: Bryan Schumaker <bjschuma@gmail.com>
2012-11-18 12:27:14 -05:00