Bryan Schumaker
258ebbc081
libsaria: Choose the next song based on the random setting
...
If random is enabled, I choose a random song from the list. If random
is disabled I choose the next song sequentially.
2011-11-07 18:33:15 -05:00
Bryan Schumaker
b6f21d5705
libsaria: Added preferences
...
Right now I only store boolean values, but I think I've coded this in a
way to make adding new values easy.
2011-11-07 08:30:53 -05:00
Bryan Schumaker
39f74eb6b4
libsaria: Various cleanups
...
- Pass inodes by reference
- Change some namespace code formatting to match later code
2011-10-28 17:02:46 -04:00
Bryan Schumaker
90ac1ecfed
libsaria: Massive audio cleanup
...
I removed libsaria/audio.cpp and did some namespace shuffling. The new
code should be easier to follow and work with.
2011-10-27 14:31: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
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
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
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
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
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
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
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
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
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
Bryan Schumaker
f354a305ae
libsaria: Change volume function
...
I introduced a function for directly setting the new volume level. It
does not allow changing by some value.
2011-09-03 09:49:09 -04:00
Bryan Schumaker
bf1d423b2f
libsaria: Don't auto-load songs passed on startup
...
I would rather have the front end program load the song rather than
assuming that everything should be loaded right away. This also gives
front end programs a chance to register callbacks before loading.
2011-08-27 12:35:28 -04:00
Bryan Schumaker
2888e741e8
libsaria: Added callback framework
...
I have created generic functions for registering and triggering
callbacks. New callbacks can be added by creating a new constant in the
callback_t enum.
2011-08-27 12:34:19 -04:00
Bryan Schumaker
1831046685
libsaria: Created a load() function
...
Calling this function will load a song.
2011-08-23 08:28:35 -04:00
Bryan Schumaker
3e2f374bf8
libsaria: created Audio() class
...
This class will be used to control gstreamer functions. So far, it can
load a song, play, and pause.
2011-08-21 19:24:33 -04:00
Bryan Schumaker
dd5ad9e87d
Began Libsaria() class
...
This class will act as an interface for the Ocarina front-end.
2011-08-21 15:45:15 -04:00