This means I no longer need to pass argc and argv parameters to core/,
so I can eventually work towards removing the Driver :: init() function.
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
This was used to get around layering issues with the gstreamer driver.
Now that the gstreamer implementation is in the gui code we can have it
call audio::next() directly.
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
It's not used anywhere else except during this one test, so move it out
of the global include files.
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
The driver is intended to be a small class, so put it in the audio code
now and we'll clean it up in future patches.
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
This is a straight copy-and-paste of the header file and the code
implementing it. I intent to clean this up with future patches.
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
This patch fixes up formatting a little bit and removes the Track
section of the DESIGN document.
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
This shifts the taglib code into library.cpp. I also remove the tagdb
section of the DESIGN document.
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
This has been disabled for some time. I added a test for adding track
indexes to the filter upon creation, but it doesn't properly test adding
to the filter when reading from disk.
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
This code is really testing date and locale handling, so this patch
renames the function to match what it actually does. While I'm at it, I
also introduce some cleanups.
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
This returns the actual size of the database, so be careful when using
it! The intent of this function is to allow some kind of iteration when
loading databases.
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
The track_db doesn't have autosaving enabled for performance reasons.
This lets us add several tracks to the database between saves, but it
also means we need to provide a commit() function.
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
I'm going to need to split this value earlier to do a unique lookup when
inserting, so the constructor can take the relative path to make things
easier.
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
I want to test basic reading and writing before running the functional
test, since the functional test will eventually trigger database
commits.
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
This makes the code a little bit cleaner, since we don't need to keep
doing lookups for each test run.
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
I don't want to expose the date structure outside of the track class, so
I'll provide a comparison function instead.
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
The new constructor covers these cases without needing to do taglib
stuff inside the Track class.
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
This patch creates a new structure to track the last played date, which
can be expanded into a class at some future point. Additionally, I use
strftime() to calculate the current date based on the user's current
locale settings.
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
I don't want anybody outside of this class changing the value, so it
shouldn't be public. I also change the primary key to use library index
instead of the full filepath while I'm at it.
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
I don't think this value needs to be stored anywhere in the Track class
since it's fairly easy to calculate. Let's convert it into a function
for now and reevaluate later!
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
I provide an accessor function to keep this value from ever getting
changed outside of the Track class.
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
We want to make sure that the _library size is decremented whenever a
track is removed or destroyed.
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>