Bryan Schumaker
12cb9a900a
libsaria: Switch most code to use all_attrs()
...
all_attrs() is my new way of doing things, so it makes sense to use it
now.
2011-06-17 20:23:32 -04:00
Bryan Schumaker
b7a45a3e18
libsaria: Controls need to import libsaria
...
I don't know why I didn't already do this...
2011-05-26 09:02:06 -04:00
Bryan Schumaker
c79677e77a
libsaria: Initialize controls on import
...
This avoids an unnecessary function call, it also makes things easier to
read and maintain.
2011-05-25 21:07:53 -04:00
Bryan Schumaker
6bc6235e01
libsaria: Remove unused import pointers
2011-05-24 08:06:03 -04:00
Bryan Schumaker
9505373198
libsaria: inc_count() in sources
...
Doesn't do anything yet, but it will eventually (once I start tracking
dynamic attrs)
2011-05-24 08:02:18 -04:00
Bryan Schumaker
531ceb2c17
libsaria: Rename library.py to oldlibrary.py
...
I want to preserve the old library as I slowly introduce the new one.
This should help.
2011-05-20 21:22:21 -04:00
Bryan Schumaker
e3af5800b0
libsaria: Check that next() returns a file
...
If next doesn't return a file, we shouldn't try to load something. That
would just be silly.
2011-05-15 10:26:38 -04:00
Bryan Schumaker
0908588325
libsaria: Generic next() in sources
...
The sources module should choose between picking the next song from the
playlist or the queue. It should also be in charge of tracking the
current song id.
2011-05-07 18:15:35 -04:00
Bryan Schumaker
889e17fab9
libsaria: Remove event system from controls
...
This is a big step forward for reving the event system entirely.
2011-05-01 12:46:17 -04:00
Bryan Schumaker
3cb39f3fcd
libsaria: Fix seeking through gui buttons
2011-05-01 12:46:16 -04:00
Bryan Schumaker
e59243e51b
libsaria: Set volume callback
2011-05-01 12:46:16 -04:00
Bryan Schumaker
99771a34fb
libsaria: on_like() callback
...
This replaces the LIKE event for setting if the user likes the current
song.
2011-05-01 12:46:16 -04:00
Bryan Schumaker
6e6705736e
libsaria: Add a load_file() callback
2011-05-01 12:46:16 -04:00
Bryan Schumaker
6c73a9c43a
libsaria: Remove STOP event
...
I can double up on the pause callback in place of a stop callback.
2011-05-01 12:46:16 -04:00
Bryan Schumaker
7879c53fe7
libsaria: Created pause callback
...
This replaces the (PRE, POST)PAUSE events
2011-05-01 12:46:16 -04:00
Bryan Schumaker
b562fff0ed
libsaria: Began implementing better callback system
...
The event system was evil, hard to use, and hard to follow. This patch
is the beginning of a new, more straightforward system.
2011-05-01 12:46:16 -04:00
Bryan Schumaker
8574cda529
libsaria: Ported over Ocarina 5.0 audio functions
...
The new audio code I developed makes more sense and should be easier to
work with. It makes sense to port it over.
2011-05-01 12:46:16 -04:00
Bryan Schumaker
3dc0b208cf
libsaria: Integrate new preferences and storage code
...
This patch re-enables most of the libsaria startup procedures. To allow
this, I had to switch over to the new preferences and object storage
code I recently came up with.
2011-05-01 12:46:16 -04:00
Bryan Schumaker
5f10a01bcb
Always clear pause_after
...
Always clearing this ensures that we don't keep pausing after playback
is resumed.
2011-05-01 11:05:54 -04:00
Bryan Schumaker
ef5be29197
web: better controls
...
I split out the web controls to a new file, and can set the status of
the play button correctly when the page is loaded. Finally, the
set_play_button() function is called on a timer so changes on the
application will be reflected on the web page eventually.
2010-12-27 19:00:27 -05:00
Bryan Schumaker
1c4621a79a
Set random directly
...
This makes much more sense than toggling it. Toggling caused an
inconsistent state during testing.
2010-12-23 09:51:09 -05:00
Bryan Schumaker
66a3344121
Controls pref initialization
...
The preferences variable should be initialized earlier to avoid an error
during startup.
2010-12-18 15:06:18 -05:00
Bryan Schumaker
0eb3a15783
Add functions for controlling "like"
...
This patch adds a function for getting the "like" status of the current
song. It also changes the "set_like" function to use an event, rather
than just setting it.
2010-12-18 11:03:25 -05:00
Bryan Schumaker
7c2778614d
Added control to set like value
...
First, this patch adds a function for setting attributes for the current
file. Second, it adds a function for specifically setting the "like"
attribute.
2010-12-17 23:33:05 -05:00
Bryan Schumaker
0c254aa957
Remove score changing code
...
I am switching to a like / dislike system, so I don't need to worry
about scores anymore.
2010-12-17 23:18:19 -05:00
Bryan Schumaker
4e5995ec64
Added pause_after control to libsaria
...
This gives me a chance to remove it as a plugin. I noticed that
sometimes I would hear a fraction of a second of music before the
pausing started. This should fix that.
2010-12-17 23:00:45 -05:00
Bryan Schumaker
3abc80bdc4
Add seeking to controls
...
Seeking should be part of controls, rather than existing independently
as part of the audio package. This patch moves the seeking functions,
and removes the need to pass a specific number of seconds.
2010-12-16 22:08:26 -05:00
Bryan Schumaker
677240eabe
Added toggle_play()
...
This function will call play() if audio is currently paused. It will
call pause() all other times.
2010-12-15 22:26:45 -05:00
Bryan Schumaker
6fc8415838
next() selects from queue
...
We check the queue for a song first, then go to the playlist.
2010-12-12 14:45:30 -05:00
Bryan Schumaker
f063da5b56
Began work on virtual sources
...
Virtual sources should make it easier to do things with the current song
without having to know anything about it (such as a song id or file
path).
2010-12-05 17:11:41 -05:00
Bryan Schumaker
36ce963d11
Initialize controls in two parts
...
This gives us a chance to initialize random early, and then grab the
audio functions later (when they exist)
2010-12-03 08:35:13 -05:00
Bryan Schumaker
efe45371db
Move set_volume() and toggle_rand()
2010-12-03 08:31:04 -05:00
Bryan Schumaker
cc6772d596
Move stop features to libsaria.controls.py
2010-12-03 08:31:04 -05:00
Bryan Schumaker
fefde40e82
Moved play and pause to libsaria/controls.py
...
They have been moved from libsaria/audio/__init__.py.
2010-12-03 08:31:04 -05:00
Bryan Schumaker
b5da80d6c2
Add libsaria/controls.py
...
I will eventually be moving things over to here. The general rule: if
it has to do with buttons on the gui, then it should probably be
considered a control.
2010-12-03 08:31:03 -05:00