Commit Graph

1247 Commits

Author SHA1 Message Date
Bryan Schumaker cad03257eb Created a PKGBUILD
Now I can submit ocarina to the AUR!  I also updated the .gitattributes
file so the PKGBUILD doesn't get included in the tarball.
2011-11-11 08:12:40 -05:00
Bryan Schumaker a9b4147df8 build: Updated Sconstruct
A few fixes before releasing 5.3
2011-11-11 08:07:58 -05:00
Bryan Schumaker 82cb17c1cb build: Added support for DESTDIR
I'll need this for my PKGBUILD
2011-11-10 17:31:27 -05:00
Bryan Schumaker 41f1c01752 build: Don't generate include/version.h all the time
Installing, cleaning and archiving don't need to create the version.h
file, so instead I'll add it as a build step for ocarina.
2011-11-09 23:17:59 -05:00
Bryan Schumaker 863bce3482 Update .gitignore
Ignore tarballs
2011-11-09 23:04:36 -05:00
Bryan Schumaker 624d9a9e74 build: Added a `scons archive` command
This will create an ocarina tarball for the current release.
2011-11-09 23:04:16 -05:00
Bryan Schumaker 42d4fd4bd1 Update attributes file
Maybe now it'll work a bit better...
2011-11-09 22:47:45 -05:00
Bryan Schumaker 36cfd0af48 ocarina: Remove old random image
I haven't use the 20-sided die image in almost a year...
2011-11-09 22:47:14 -05:00
Bryan Schumaker 2aa79126ec Added .gitattributes file
I want to be able to ignore the screenshots directory when generating an
archive.
2011-11-09 22:43:23 -05:00
Bryan Schumaker 958020f270 libsaria: Check stream status before reading
If we are unable to open the preferences file we shouldn't try to read
from it.  This led to a segmentation fault when compiled in release
mode, but for some reason it worked when compiled in debug mode?
2011-11-09 17:28:19 -05:00
Bryan Schumaker 1d704a3ac0 Ocarina 5.3-rc1 2011-11-09 17:28:09 -05:00
Bryan Schumaker 6f96a1d135 build: Generate ocarina.sh during instatll
I was doing this whenever the Command() class was constructed, instead I
only want to do this when it's run.
2011-11-09 08:34:08 -05:00
Bryan Schumaker 026bf0c010 libsaria: Only load song if string is not empty
It's stupid to try loading an empty string.
2011-11-09 08:33:40 -05:00
Bryan Schumaker ab3c89d5e6 Added license
I wanted something simple, so after some google searching I decided to
go with a "plain language" version of the GLP v2.  This means I can
understand it, since it's not written in lawyerspeak.
2011-11-09 08:31:36 -05:00
Bryan Schumaker db70dd8fe6 build: Don't cd when running the binary
Relative paths should keep working now.
2011-11-08 08:21:56 -05:00
Bryan Schumaker 66f70249ad ocarina: Load images using the full path
relative paths can't be trusted once the program has been installed.  To
get around this, I assume that the install directory has been configured
correctly and then point to images located in the subdirectory next to
the executable.
2011-11-08 08:20:21 -05:00
Bryan Schumaker 11d92eef89 libsaria: Add a debugging message
Helpful for knowing what path the audio subsystem is attempting to load.
2011-11-08 08:19:47 -05:00
Bryan Schumaker 8aebd278f2 build: Create an install target
This copies files into /usr/lib/ocarina and then creates
/usr/bin/ocarina to run the program.
2011-11-07 23:42:59 -05:00
Bryan Schumaker 3fe03734a1 ocarina: Pack tag labels into a scrolled window
I don't like the main window resizing, so we allow the users to scroll
if the tags take up too much space.
2011-11-07 19:43:09 -05:00
Bryan Schumaker 30246df924 ocarina: Improved label setting function
I created a single function to escape the text and set it in the label.
I don't know why I didn't do this from the beginning!
2011-11-07 19:22:46 -05:00
Bryan Schumaker 5ae5174536 ocarina: Left justify tag labels
I like this look better than the centered look.
2011-11-07 19:06:49 -05:00
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 e409c2317f ocarina: Added a random button
Random hasn't been implemented in libsaria yet, but I can still create
the button to test preferences.  The random button should set itself to
the value store in the preferences file.
2011-11-07 08:32:01 -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 0f2d682216 ocarina: Split buttons over two rows
The single row was getting somewhat long, so I split them up.
2011-11-06 20:33:47 -05:00
Bryan Schumaker 913b9f8630 ocarina: Seek to different parts of the song by clicking
Button 1 seeks by 10 seconds either forward or backward, button 2 seeks
to an absolute position.  I initally wanted to switch the behavior of
these two buttons, but for now I'll just have to get used to the GTK
defaults.
2011-11-06 20:26:11 -05:00
Bryan Schumaker c1332133a9 libsaria: Change meaning of audio::seek_to()
It used to seek to a percentage of the pipeline, but now is seeks to an
absolute position in nanoseconds.
2011-11-06 20:25:13 -05:00
Bryan Schumaker 6b58311e9e libsaria: Call next() at the end of the stream
It's nice to pick another song after the end of the current one.
2011-11-06 19:44:16 -05:00
Bryan Schumaker fffb9875ac ocarina: Add a next() button
Users press this button to choose the next song.
2011-11-06 19:18:03 -05:00
Bryan Schumaker e908f46c21 libsaria: Implement a next() function
This will pick the next song from the library to play.
2011-11-06 19:17:15 -05:00
Bryan Schumaker 9379a2cf33 libsaria: Better track comparision function
I sort by artist / album / track, so I need to check each of these
fields in order.  It would be nice if I could expand numbers into words
for some tags (3 Doors Down, Matchbox 20 and so on), but I'm happy with
what I have right now.
2011-11-06 15:44:45 -05:00
Bryan Schumaker 858fa1821f libsaria: Turn the play_list into a list of pointers
Pointers to a TrackTag structure are easier to pass around than the
TrackTag structure, so this should speed up sorting.  Also it removes
duplicated memory between the LibraryPaths and the play_list.
2011-11-06 13:57:09 -05:00
Bryan Schumaker 095ade27ad libsaria: Sort play_list by artist
Right now I do a basic string comparison.  I should eventually format
the strings to remove punctuation and use the same case.
2011-11-06 13:49:20 -05:00
Bryan Schumaker 4f2c75499f libsaria: Clean up LibraryPath class
I moved around some code and removed undefined functions
2011-11-06 13:39:14 -05:00
Bryan Schumaker 922c9e86ef libsaria: Get info from play_list
It's easier with everything in one single list.
2011-11-06 13:36:11 -05:00
Bryan Schumaker 5ae5a349de libsaria: Play tracks from the play_list
Rather than finding the id in the LibraryPath lists, I instead find it
in the play_list list and store an iterator to this track.
2011-11-06 13:15:48 -05:00
Bryan Schumaker b3cb20dd5d libsaria: Properly set the inode for each track tag
I was setting local variables rather than the TrackTag variable.  No
wonder things didn't work
2011-11-06 13:09:59 -05:00
Bryan Schumaker 5b2e0c7b82 libsaria: Fill a SourceModel from the play_list
Looping over a single list is really easy and straightforward!
2011-11-06 12:44:14 -05:00
Bryan Schumaker cdcaaeb8c8 libsaria: Report the library size as the play_list size
This is simpler than looping over all library paths and adding up their
individual sizes.
2011-11-06 12:39:13 -05:00
Bryan Schumaker 637ea47a60 libsaria: Insert all tracks into one giant list
This puts everything in one place for easy use (I hope)
2011-11-06 12:34:41 -05:00
Bryan Schumaker b55ac22866 libsaria: Introduce a rebuild_list() function
I am going to create a play list in memory based on the state of the
library.  To do this, I first need a way to trigger construction of a
list.
2011-11-06 12:16:54 -05:00
Bryan Schumaker 7507955018 libsaria: Fix bug in updating library
I was readding all tracks to the new linked list, rather than checking
if the track existed first.  This has been fixed.
2011-11-06 12:11:31 -05:00
Bryan Schumaker b5c8efc6d5 libsaria: Move LibraryPath functions to path.cpp
This is really what path.cpp is all about.
2011-11-06 11:50:16 -05:00
Bryan Schumaker d23c1c72f0 libsaria: Move library update code to new file
Putting it all in path.cpp along with other LibraryPath functions was
getting confusing.  I'd rather just have it all in a new file for
simplicity.
2011-11-06 11:47:26 -05:00
Bryan Schumaker 297c0637ea libsaria: Rename path list accessor functions
I added these functions into the library namespace so I can remove the
"_library_" part of the function names.
2011-11-06 11:36:12 -05:00
Bryan Schumaker d678a5c170 libsaria: Move library path constructor
This constructor creates a library path from a file, so it makes sense
to store it in file.cpp instead of path.cpp.
2011-11-06 11:29:38 -05:00
Bryan Schumaker 6d7828b946 libsaria: Store library path as a linked list of track tags
Lookup by id will be slighly slower, but now I will have one list for
each path that can be merged together and sorted to represent the
library.  This sounds like a good tradeoff to me, especially since I can
store an iterator to the current track when deciding what to play next.
This will give me much faster access to song for the current track.
2011-11-06 11:16:46 -05:00
Bryan Schumaker 9c0e61b42d libsaria: Create track tags with an inode
I need to store the inode somewhere if I want to use a linked list to
store LibraryPath data.  I currently have a map <ino_t, TrackTag>, so
the obvious choice is to store the inode in the TrackTag structure.
2011-11-06 10:54:45 -05:00
Bryan Schumaker 8609b9a6a7 libsaria: Use a linked list of library paths
I was using a map, but the map required duplicating the library path
everywhere.  Except for removing a path, I don't ever need to look up a
specific path by name, so why bother optimizing this case?  Iterating
over a linked list should be more efficient (and easier to comprehend)
2011-11-06 10:43:35 -05:00
Bryan Schumaker 6930c1ccf3 Ocarina: Add a test menu item
The label for the menu reads "test", but it doesn't do anything yet.
2011-11-04 08:25:51 -04:00