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
Bryan Schumaker
679bf41cc1
libsaria: Move include/audio.h to the audio directory
...
The audio class can easily be defined in a file located in the audio/
directory. This frees up the audio.h name for a UI-facing include file.
2011-09-12 11:14:23 -04:00
Bryan Schumaker
d3b8020bbe
libsaria: Remove libsaria class
...
I replaced the class functions with simple functions that exist in
multiple files. I think things will be easier to work with now.
2011-09-12 11:08:56 -04:00
Bryan Schumaker
dbce5c244a
libsaria: Move idle trigger to new file
...
I think the idle code will be easier to manage if it is in its own file.
2011-09-12 10:38:27 -04:00
Bryan Schumaker
c3eb748f44
libsaria: Move idle object out of libsaria class
...
This helps me prepare to remove the libsaria class.
2011-09-12 10:30:22 -04:00
Bryan Schumaker
33fe24fc64
Remove callbacks from libsaria class
...
These can easily exist as its own set of functions, and I want to remove
the libsaria class in the future.
2011-09-10 13:46:09 -04:00
Bryan Schumaker
a660d5a34a
ocarina: Register an idle function
...
This function will call the libsaria_idle_task() function to process the
next idle task.
2011-09-10 11:22:57 -04:00
Bryan Schumaker
84c0f7fe21
libsaria: Create an idle driver and idle task
...
Right now both classes are empty, but eventually I will add in support
for creating new idle tasks and for removing tasks from the idle queue.
2011-09-10 11:22:03 -04:00
Bryan Schumaker
36212af3a4
ocarina: Don't do anything if chooser result is blank
...
If we don't have a filepath to scan or play then we shouldn't do
anything with the path.
2011-09-10 10:49:51 -04:00
Bryan Schumaker
705ca61e6a
ocarina: Select a directory to scan
...
This directory will eventually be scanned and added to the library.
Right now I just print it to the screen.
2011-09-10 10:45:52 -04:00
Bryan Schumaker
13244b880c
ocarina: Make a generic chooser function
...
I want a function that can be used to select either a file or a
directory.
2011-09-10 10:41:47 -04:00
Bryan Schumaker
9df15e944c
ocarina: Add a text button for library scanning
...
A text button will use a slightly larger image to make it easier to see.
This also gives me an opportunity to add some help text to describe what
the button does.
2011-09-10 10:30:25 -04:00
Bryan Schumaker
95ebff8b6e
ocarina: Make generic button-building functions
...
I want to have buttons with text in addition to images. To help with
this, I created some functions that should help with that.
2011-09-10 10:07:48 -04:00
Bryan Schumaker
62b86f5136
ocarina: Add a settings tab for library management
...
Right now I just add an empty vbox to the page. I eventually want to
show information about each library path.
2011-09-10 09:42:34 -04:00
Bryan Schumaker
b8f977cc35
ocarina: Add a switch for tab label expanding
...
Pass in true to cause the tab label to expand and fill up the entire
space, false if the label should not expand.
2011-09-09 08:27:58 -04:00
Bryan Schumaker
2110319176
ocarina: Resize window
...
I resized the window to 800 x 600, and then changed the main tabs to
fill up the entire space.
2011-09-09 08:23:43 -04:00
Bryan Schumaker
976637f88b
ocarina: Add settings tab
...
Eventually this tab will be used for configuring everything. Right now
it's an empty page.
2011-09-09 08:14:07 -04:00
Bryan Schumaker
c3b82c401f
ocarina: Created tabs for the main window
...
Most things are going to be displayed in a gtk notebook. This patch
creates that notebook.
2011-09-07 08:25:52 -04:00
Bryan Schumaker
7b48c3311d
ocarina: Rename gui/ to ocarina/
...
I think ocarina/ is a better name for this directory, and now that I've
named the executable "ocarina.bin" I can do this again. I also added
functions for creating a page footer with the basic controls.
2011-09-07 08:12:02 -04:00
Bryan Schumaker
a097e751b2
ocarina: Remove custom icon size from button constructor
...
All buttons are the same size, so there is no point in requesting the
size for each button.
2011-09-06 07:57:06 -04:00
Bryan Schumaker
39a8f861c7
ocarina: Added a fast-forward button
...
Clicking it advances the song by 5 seconds
2011-09-03 23:15:30 -04:00
Bryan Schumaker
bd6aea830b
libsaria: Fix finding audio duration
...
I needed to pass in a value for the format argument...
2011-09-03 23:09:31 -04:00
Bryan Schumaker
c2c3a1eea9
ocarina: Added a rewind button
...
Pressing the rewind button rewinds the song by 5 seconds.
2011-09-03 23:06:13 -04:00
Bryan Schumaker
ded2c559af
libsaria: Fix up the audio seek() function
...
It now seeks forward or backward through a song by dt seconds.
2011-09-03 23:03:31 -04:00
Bryan Schumaker
77a7f84110
libsaria: Created a seek_to() function
...
This function will seek to an absolute percentage of a song, rather than
by some displaced amount.
2011-09-03 22:32:12 -04:00
Bryan Schumaker
4b3b1babbc
libsaria: Add progress file
...
This will include code for seeking and getting the current position in
the song. Right now I just have a function for resetting the position
to the beginning of the song.
2011-09-03 21:55:42 -04:00
Bryan Schumaker
937fbc1111
Move volume helper functions
...
I moved these to a volume.h file to keep them separate from controls.
2011-09-03 21:31:21 -04:00
Bryan Schumaker
ef3e18ba25
ocarina: Use the new libsaria convenience functions
...
When libsaria changes, I won't have to recompile as much (in theory)
2011-09-03 21:10:41 -04:00
Bryan Schumaker
e10a8e97f4
libsaria: Create convenience functions for libsaria
...
Now I won't have to keep using libsaria_get() to access parts of
libsaria. This should also cut down on the number of things that need
to be recompiled when libsaria is changed...
2011-09-03 21:07:52 -04:00
Bryan Schumaker
7cdd6b1664
ocarina: Set volume button to current audio levels
...
When the button is created, it should be set to the current volume of
the gstreamer pipeline. If I don't do this, the icon will default to a
"muted" status.
2011-09-03 10:25:53 -04:00
Bryan Schumaker
ceddd240ca
libsaria: Added a get_volume() function
...
I use this function to get the current volume levels. I added and extra
variable to the Audio class to track what the current volume is.
2011-09-03 10:24:34 -04:00
Bryan Schumaker
5a8cafa4d8
libsaria: Add a VOLUME callback
...
This will be triggered whenever the volume changes through the libsaria
class.
2011-09-03 10:08:54 -04:00