Commit Graph

1247 Commits

Author SHA1 Message Date
Bryan Schumaker 61153a0580 ocarina: Added update library button
This button will call the new library::update() function
2011-10-20 13:24:11 -04:00
Bryan Schumaker c4cdfbe4b3 libsaria: Added library::update()
This will rescan every library path and add new files to the library.
Eventually it should probably remove files that no longer exist...
2011-10-20 13:24:11 -04:00
Bryan Schumaker 60dc610195 ocarina: Display library paths
Right now I simply create a list during startup.  I still need to clear
this list and refill it whenever the library is updated.
2011-10-20 13:24:11 -04:00
Bryan Schumaker 2a6d05ebee libsaria: Fill out a struct PathInfo
This struct is used by the gui to show how large a library path is
and eventually to remove it from the library.
2011-10-20 13:24:08 -04:00
Bryan Schumaker e8341288b3 ocarina: Songlist improvements
- Function pointers for specific tasks
- Change label text
- Use libsaria namespaces
2011-10-19 10:00:01 -04:00
Bryan Schumaker 8cf3caeb27 libsaria: Added function for getting the library size
I like to show this on the library tab so I know how many songs are
currently in the library.
2011-10-19 09:58:30 -04:00
Bryan Schumaker a508b7ff72 libsaria: Rip out old library
The code was a bit messy and didn't make use of namespaces very well.
By converting to a set of functions (instead of a class) I can use
each function as a function pointer if I want to.  I am also able to
remove libsaria/library.cpp since this was just a set of wrapper
functions to the old static class functions.
2011-10-18 10:02:55 -04:00
Bryan Schumaker 1b18069b77 ocarina: remove unnecessary add_callback() function
It only called the register_callback() function, so there is no point in
keeping it around.
2011-10-02 11:07:36 -04:00
Bryan Schumaker ef7d9d0fe2 Bump minor version number
I'm no longer working on 5.1, so might as well change this
2011-10-02 10:53:52 -04:00
Bryan Schumaker c8daf92af4 libsaria: Save to XDG_CONFIG_HOME
I plan on storing all my preferences there rather than creating my own
save directory.  This will keep things consistent with other
applications the user may have.
2011-10-02 10:52:23 -04:00
Bryan Schumaker 1996b54065 ocarina: Update to new libsaria namespace
The old functions are no longer defined, so this patch updates to the
new functions.
2011-10-01 13:27:43 -04:00
Bryan Schumaker cea236a757 libsaria: Introduce libsaria namespace
Now I don't need to define everything as libsaria_some_func(), instead
these functions will exist in the libsaria namespace.
2011-10-01 13:27:31 -04:00
Bryan Schumaker 165a359655 ocarina: Fill library on startup
Once the library has been loaded we can display it to users.
2011-10-01 12:52:05 -04:00
Bryan Schumaker 1a7b8a5ae9 libsaria: Load a saved library
No point in saving a library if I can't make use of the save file later.
2011-09-30 08:12:26 -04:00
Bryan Schumaker 1d1ecc8d8c libsaria: Save the library scan results
I write each track to a file that will be read in on startup (once those
changes are committed)
2011-09-27 08:23:49 -04:00
Bryan Schumaker 517faceb99 libsaria: Add tasks to the front and back of the queue
Queueing a task to run immediately can be useful, especially if it's
something like saving data as part of a "checkpoint"
2011-09-27 08:22:24 -04:00
Bryan Schumaker a97da1dd05 libsaria: Create the saria dir on startup
This is either ~/.saria or ~/.saria-debug, depending on if we're running
a debug build or not.
2011-09-22 08:21:57 -04:00
Bryan Schumaker 250964a351 ocarina: Freeze and thaw during a clear
This should speed up clearing the list, too.
2011-09-21 08:21:45 -04:00
Bryan Schumaker ce2f9f02f8 ocarina: Freeze and thaw the liststore while filling
This causes fewer refreshes of the liststore and speeds up filling it
in.
2011-09-21 08:12:56 -04:00
Bryan Schumaker 284176fb5c ocarina: Play a song when a row is double-clicked
This is a natural way for the user to play a specific song.
2011-09-20 08:35:24 -04:00
Bryan Schumaker 2017e8a2f1 libsaria: Play tracks based on inode number
This allows the UI to pass in an inode returned by the track list used
to set up the display.
2011-09-20 08:34:02 -04:00
Bryan Schumaker 309cda851f ocarina: Insert songs in the songlist
I created an insert() function that will fill in the list and display
all the songs.
2011-09-19 19:48:37 -04:00
Bryan Schumaker 0326b9c7e4 libsaria: Add accessor functions for Track and Tag classes
I need to get at these variables to add them to a list in the UI
2011-09-19 19:47:31 -04:00
Bryan Schumaker 7bf6f48488 ocarina: Display treeview columns
Columns are displayed with the names of attributes that will be listed.
2011-09-18 19:19:20 -04:00
Bryan Schumaker 1c944d3156 ocarina: Get list of library tracks
This will be used to fill in a gtk listview sometime soon
2011-09-18 18:07:59 -04:00
Bryan Schumaker 884a0331e2 ocarina: Listen for correct callback 2011-09-18 18:07:40 -04:00
Bryan Schumaker 6dfe4de57b libsaria: Create a list of all tracks in a library
This list will eventually be used to fill in a gtk listview, but for now
I gather all the information in one place.
2011-09-18 18:06:54 -04:00
Bryan Schumaker 170e700746 ocarina: Listen for LIBRARY_REFRESH callback
I eventually want to add songs to the songlist, but for now it is enough
to wait for this callback.
2011-09-18 17:27:12 -04:00
Bryan Schumaker 69beb10d6b libsaria: Added LIBRARY_REFRESH callback
This callback is triggered during a library update to tell the UI that a
new version of the library is available.
2011-09-18 17:25:57 -04:00
Bryan Schumaker 3a5a41f53f ocarina: Added bare songlist and a library tab
Eventually the songlist class will list all songs in the library.  For
now, I just create an empty window and add it to the main tabs.
2011-09-18 14:43:46 -04:00
Bryan Schumaker 18ebac3937 Bump minor version number
I've been working on Ocarina-5.1 for a while, so I might as well
reflect that in the code.
2011-09-18 12:45:54 -04:00
Bryan Schumaker 7aff13f382 libsaria: Add tags to the library
I add each scanned track to the library for use later.
2011-09-18 12:20:59 -04:00
Bryan Schumaker a685023bcb libsaria: Convert length into a string
I format it into mm:ss format for UIs to display.
2011-09-18 11:39:18 -04:00
Bryan Schumaker 3255b045f0 libsaria: Find audio properties of each scanned song
This gives me the length, bitrate, sample rate and number of channels.
2011-09-18 11:23:44 -04:00
Bryan Schumaker 333a3a4b04 libsaria: Tag files to add to the library
I collect the artist / album / title / ... tags and add them to a class.
2011-09-17 14:16:06 -04:00
Bryan Schumaker 65c04585a3 ocarina: Print out the correct version
I should print out the value returned by vers_str(), rather than
hardcoding in "5.0"
2011-09-17 13:51:45 -04:00
Bryan Schumaker 0f38005bdb ocarina: Use new print functions
This mostly involved switching each print() to a println()
2011-09-17 13:50:37 -04:00
Bryan Schumaker 2c2e058b49 libsaria: Use new print functions
This mostly involved switching each print() to a println() to end the
line.
2011-09-17 13:50:13 -04:00
Bryan Schumaker ef5da936b4 libsaria: New print functions
I added a print(int) function to print out integer values.  I also
created println() functions for strings and ints.
2011-09-17 13:48:09 -04:00
Bryan Schumaker 1abdd945ae libsaria: Create scan tasks for each subdirectory
I want to recursively scan each directory for music files.
2011-09-17 12:56:39 -04:00
Bryan Schumaker 5167c6f012 libsaria: Read a directory into two vectors
I separate out directories and files so they can be processed
differenty.
2011-09-17 12:27:20 -04:00
Bryan Schumaker dfdb38be27 ocarina: Don't always run the idle task
I register the idle task when there are events in the idle queue and I
remove the idle task once those events have been processed.  This should
cut down on CPU usage when nothing is happening.
2011-09-13 17:35:21 -04:00
Bryan Schumaker 59fbd0c696 libsaria: Notify UI when the idle queue size has changed
When the first task is queued, I trigger a callback so the UI can start
processing when idle.  I return the size of the queue from both
run_task() and queue_task() so the UI knows when to stop processing
callbacks.
2011-09-13 17:27:46 -04:00
Bryan Schumaker e94ca6b9d6 libsaria: Rename UpdateTask to ScanTask
I feel that ScanTask is a better name
2011-09-13 08:04:59 -04:00
Bryan Schumaker b84b7b415d libsaria: Remove .swo files
They shouldn't have been added in the first place...
2011-09-13 08:04:25 -04:00
Bryan Schumaker 6cd4cbdba8 ocarina: Call the add_library() function
This function will add a new path to the library map and then scan it,
adding music files to the library.
2011-09-12 14:18:30 -04:00
Bryan Schumaker b43fcc4b05 libsaria: Queue an idle task to update the library
I don't actually perform a library update at this point, but I do create
a new task and add it to the update queue.  When the run_task() function
is called, the task is removed from the queue and deleted.
2011-09-12 14:18:23 -04:00
Bryan Schumaker c0a80623f5 libsaria: Created new idle.h
This exposes the libsaria_idle_task() function to the UI.
2011-09-12 11:31:58 -04:00
Bryan Schumaker 7840f491a1 libsaria: Move idle header files to idle directory 2011-09-12 11:27:58 -04:00
Bryan Schumaker 8a83b57010 libsaria: Create a new include/libsaria/audio.h
This file contains the audio init function.
2011-09-12 11:20:12 -04:00