Commit Graph

1092 Commits

Author SHA1 Message Date
Bryan Schumaker 0ed8e48668 tests: Various improvements
- Don't be verbose when removing files.
- Reverse diff order so output makes more sense.
- Only strip whitespace from the end of lines.

Signed-off-by: Bryan Schumaker <bjschuma@gmail.com>
2014-04-06 19:56:52 -04:00
Bryan Schumaker 328c6f70e8 file: Implement reading and writing
- Inherit from fstream to gain access to << and >> operators.
- Make the file version accessable to the outside world.

Signed-off-by: Bryan Schumaker <bjschuma@gmail.com>
2014-04-06 19:56:52 -04:00
Bryan Schumaker ecd56831f6 file: Open and close files
- Support OPEN_READ and OPEN_WRITE
- Update the design to accomidate for error checking
- Add lib/test.cpp containing basic functions that can be used for
  testing

Signed-off-by: Bryan Schumaker <bjschuma@gmail.com>
2014-04-06 19:56:52 -04:00
Bryan Schumaker e0a32c10ac lib: Add basic file class
The class resolves the path to the ocarina directory based on the file
hint provided.  NOTE: compile-debug.good and compile.good resolve paths
to my home directory.  Other users will need to change the values for
the test to pass.

Signed-off-by: Bryan Schumaker <bjschuma@gmail.com>
2014-04-06 19:56:52 -04:00
Bryan Schumaker c65e0bdb2a build: Change CONFIG_* variables into a class
The class is in charge of resetting fields at will, and will be able to
maintain everything easier than if I were to do it by hand.

Signed-off-by: Bryan Schumaker <bjschuma@gmail.com>
2014-04-06 19:56:52 -04:00
Bryan Schumaker 13a0d25e8f build: Only create a single build environment
I was using a debug and a release environment for programs, that way
both versions of tests could be checked.  Instead, it'll be simpler to
only use a single environment and then control debug information using
CONFIG_DEBUG.

Signed-off-by: Bryan Schumaker <bjschuma@gmail.com>
2014-04-06 19:56:51 -04:00
Bryan Schumaker b5d3a663e0 print: Print the Ocarina version to a file
The basic/print.cpp test will write version information to a file using
both dprint() and print().

Signed-off-by: Bryan Schumaker <bjschuma@gmail.com>
2014-04-06 19:56:51 -04:00
Bryan Schumaker 7c67d062df build: Make it easier to change command line macros
I store release and debug options in a list so that env.Replace() can be
used to set, modify, and restore values.

Signed-off-by: Bryan Schumaker <bjschuma@gmail.com>
2014-04-06 19:56:51 -04:00
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 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 5f5f23bf9e Build: Create version.h using an Sconscript file
This lets me pull code out of the generic Sconstruct, so it can't be
bad!  I also removed the test directory since I never made unit tests.

Signed-off-by: Bryan Schumaker <bjschuma@gmail.com>
2012-05-27 10:23:47 -04:00
Bryan Schumaker 5d687176e8 tests: Began creating test programs
I want these to help check for memory leaks and other problems.  Maybe
one day I can run them through Jenkins!

Signed-off-by: Bryan Schumaker <bjschuma@gmail.com>
2012-02-09 08:22:40 -05:00
Bryan Schumaker 1ed7e58c99 libsaria: Remove old tests
These files were created for developing small components during initial
design.  I haven't used them in a long time, and most are probably
obsolete by now.
2011-05-11 22:31:28 -04:00
Bryan Schumaker f869b17e2f Rename backup functions
Backup has been renamed to export
Restore has been renamed to import_xml
2010-12-18 14:52:31 -05:00
Bryan Schumaker 83ebf78d2b Tree prefs test persistance 2010-12-03 08:30:12 -05:00
Bryan Schumaker e56d2b807e Tree prefs test
This was used for developing the preferences tree.
2010-12-03 08:30:12 -05:00
Bryan Schumaker 701306fef6 libsaria sources change
Change files to reflect the rename of libsaria.collection to
libsaria.sources
2010-12-03 08:30:12 -05:00
Bryan Schumaker 2949535aba Val trees walk values
Val trees can walk through their values in addition to their paths.  A
doubly-linked val tree can also walk values backwards.
2010-12-03 08:29:15 -05:00
Bryan Schumaker fe449ffea4 Value Trees
Value trees store a value in addition to the path.  They come in normal
and doubly-linked flavors.
2010-12-03 08:29:15 -05:00
Bryan Schumaker 5dbbeb7dcb DLFSTrees
Doubly linked filesystem trees are both a doubly linked tree and a
filesystem tree.  They can walk paths backwards.
2010-12-03 08:29:15 -05:00
Bryan Schumaker 825a8b8346 Add DLTree()
This patch adds a double-linked tree class for use in storing the
library.  This class can walk backwards from a leaf node when
walk_backwards is called.
2010-12-03 08:29:15 -05:00
Bryan Schumaker 2dc7f58206 Rename libsaria.music
I decided that libsaria.music should be known as libsaria.audio.  It
makes more sense to me.
2010-12-03 08:29:14 -05:00
Bryan Schumaker 8ca67cd4c7 Libsaria trees
libsaria.path.make_tree(path) will return a tree rooted at path
2010-12-03 08:29:13 -05:00
Bryan Schumaker 65ccdb1780 Library backup
I can now backup the library to an xml file.  This will be useful for
library updates in the future.  The plan is to eventually backport this
feature to Ocarina 4.1 (To make the 4.1 -> 4.2 transition easier)
2010-11-19 22:51:56 -05:00
Bryan Schumaker 5c842def01 Generic cache
I have created a generic cache to hold information outside of the
library.  This could include album art or an artist bio.
2010-10-24 17:26:53 -04:00
Bryan Schumaker 6934974d75 Time strings
During scanning I convert the length into a time string ( "h:mm:ss" ).
This is drawn in the gui when a collection list is populated.
2010-10-11 18:22:05 -04:00
Bryan Schumaker 6c6477b677 Index filtering
I have implemented simple filtering over the library.  This will return
a set of visible songs based on the search pattern.
2010-10-10 23:06:54 -04:00
Bryan Schumaker 168025fb60 Collection Indexing
I can now add songs to a collection's index.  The index only works for
unicode string right now (all others must be converted)
2010-10-10 13:45:52 -04:00
Bryan Schumaker 2c27185679 Use new collection structure to populate the library list. 2010-10-08 13:09:42 -04:00
Bryan Schumaker adcb73dac9 Have a working doubly-linked tree based library.
I have a bit more to do before I support everything the old library did.
Mostly getattr work.
2010-10-06 23:31:36 -04:00
Bryan Schumaker ab29b2cb2b More work with collections based on doubly linked trees 2010-10-03 19:00:06 -04:00
Bryan Schumaker 31b470e597 Track tags in another double linked tree. Create a record for each
track linking to each tree.  Create a library filter for creating a
library.
2010-10-01 21:33:19 -04:00
Bryan Schumaker 8221411ca2 Double linked trees
I have begun working on doubly-linked trees for use in collections.
2010-10-01 12:32:24 -04:00
Bryan Schumaker 4a5085d973 File chooser window
I have created my own file chooser window that can select both files and
directories.  Currently, the "OK" button must be clicked to select
anything.
2010-09-12 19:11:37 -04:00
Bryan Schumaker 2aded0e67f Filesystem Selecting
Began experimenting with a filesystem selector that can select both
files and directories.
2010-09-10 17:46:42 -04:00
Bryan Schumaker 15cc5d22f0 Backend and frontend changes
Libsaria events now support starting specific callback functions in a
background thread.  This replaces starting a specific event in the
background.

I have a library tab that is added to the main window through use of the
ocarina.add_tab function.

I have new tests for walking the tree and running multiple threads with
locks.
2010-08-19 23:02:30 -04:00
Bryan Schumaker d8cadb83e9 Collection Tree
I have implemented a tree to store store information about each track.
I now support tracks that have the same artist, album, and title.
2010-08-12 22:11:13 -04:00
Bryan Schumaker 71b3289f62 Improved collection indexing
I can now create an index over an entire collection faster.  The
bottleneck is still disk accesses, but I still think this was a good
challenge.
2010-08-12 08:27:21 -04:00
Bryan Schumaker 52b1236b29 Collection work
I've begun work on a generic collection class for the library, playlist,
and queue.  Tagpy functions have been merged into the
libsaria.collections.__init__.py file to make things easier.
2010-08-08 14:30:15 -04:00
Bryan Schumaker 25a0d0be9f Added audio functions
I have reworked the gstreamer functions from Ocarina 4.0 and combined
everything into one file.  I have also created an audio test that plays
a song from my library.
2010-08-07 19:39:46 -04:00
Bryan Schumaker 57ec240798 Added event system
I combined various parts of the Ocarina 4.0 event system into one file.
The new event file has threading abilities built in, so I no longer need
an external file for that
2010-08-07 14:23:50 -04:00
bjschuma 4d71ae824d Working Map class and test suite
I revised the Ocarina 4.0 map class so it will hopefully have better
performance.  I also began working on a new testing system so testing
specific changes should be easier than with Ocarina 4.0
2010-08-07 12:55:23 -04:00