Commit Graph

22 Commits

Author SHA1 Message Date
Anna Schumaker ead1397b31 Remove Doxygen tags
I wasn't actually using Doxygen for anything, so it's probably best just
to remove it.

Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2015-09-02 14:24:42 -04:00
Anna Schumaker ec4d3b945e audio: Fix seeking on ARM
The on_seek() function needs to take an int64_t to avoid truncating on
ARM.

Signed-off-by: Anna Schumaker <anna@ocarinaproject.net>
2015-04-14 09:05:09 -04:00
Anna Schumaker 657ce8f0f4 audio: Ensure position and duration results are 64 bits
A long int is shorter on ARM than x86, which could cause position and
duration values to get truncated.  Additionally, quering gstreamer with
a long int causes a compile error on ARM.  Let's just do the right thing
and make this value an int64_t.

Signed-off-by: Anna Schumaker <anna@ocarinaproject.net>
2015-04-14 09:05:05 -04:00
Anna Schumaker 12260a3de9 string: Add a function for converting seconds to string
This is used to get a string representation of the number of seconds
passed in.

Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2015-01-27 09:23:14 -05:00
Anna Schumaker f84a1dd891 audio: Shuffle around the code a bit
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2014-12-20 16:05:01 -05:00
Anna Schumaker 21f3f7c828 Audio: Remove the _load_track_default() function
There are only two callers, and removing it makes the code more
obvious.

Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2014-12-20 15:58:29 -05:00
Anna Schumaker 92d264d4ac audio: Move Driver into audio.h
I also rename from Driver -> AudioDriver.

Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2014-12-20 15:48:07 -05:00
Anna Schumaker acac350879 audio: Remove on_pause_count_changed callback
The UI should handle this directly on end-of-stream messages.

Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2014-12-20 15:44:40 -05:00
Anna Schumaker b633f3fa0c gst: Update the "now playing" fields through the GST driver
This lets me remove the on_track_loaded() callback function by handling
this event directly.

Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2014-12-20 12:05:22 -05:00
Anna Schumaker d7113cb124 driver: Pass Tracks to the load() function
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2014-12-20 12:01:38 -05:00
Anna Schumaker a4ad0aa79b driver: Fold eos() into the driver
With this patch I no longer need a Driver :: init() function to handle
picking the next track.

Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2014-12-20 11:04:14 -05:00
Anna Schumaker e866ea2574 audio: Make audio functions more consistent
Sometimes I would check for cur_track, other times !cur_track.

Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2014-12-20 10:30:22 -05:00
Anna Schumaker fd2a251c14 audio: Initialize GST from the gui layer
This means I no longer need to pass argc and argv parameters to core/,
so I can eventually work towards removing the Driver :: init() function.

Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2014-12-20 10:16:44 -05:00
Anna Schumaker e7a8ad54bd Audio: Remove the driver on_error() callback function
This was used to get around layering issues with the gstreamer driver.
Now that the gstreamer implementation is in the gui code we can have it
call audio::next() directly.

Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2014-12-19 17:26:39 -05:00
Anna Schumaker b9d4c6749d audio: Move the get_driver() function into the audio namespace
It's already in the audio.cpp file, so just reshuffle things a little
bit.

Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2014-12-19 14:54:12 -05:00
Anna Schumaker f20898b79c driver: Merge code with audio.cpp
The driver is intended to be a small class, so put it in the audio code
now and we'll clean it up in future patches.

Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2014-12-19 14:37:56 -05:00
Anna Schumaker c7fe5b18d5 tagdb: Rip out most tagdb functions
Most of this are a straight replacement with the new versions in
tags/track.cpp.

Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2014-12-04 08:31:52 -05:00
Anna Schumaker 48b25945cc DatabaseEntry: Rename id to _index (and make it private)
This variable should only be set by the Database when a DatabaseItem is
first created.  This means I should hide _index from the rest of the
world to prevent accidental modifications.  I also add an accessor
function for other code that needs to read _index.

Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2014-11-02 10:25:41 -05:00
Anna Schumaker 0a9c6d296b Add doxygen documentation for audio.h, core.h, and version.h
I want to have all of Ocarina documented in the code, rather than in a
difficult-to-maintain DESIGN file.  Let's get going on that!

Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2014-09-12 16:36:46 -04:00
Anna Schumaker 5c2bd9231d core: Remove on_play() callback
It has no users anymore.

Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2014-09-11 08:01:08 -04:00
Anna Schumaker 1a6b6d9c54 audio: Remove the on_play() callback
There are no more users of this function.

Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2014-09-08 17:26:21 -04:00
Anna Schumaker 95064e4537 Rename lib/ -> core/
I plan to introduce a new lib/ that sits between the gui and the backend
files (similar to how glibc sits between the kernel and userspace).
This gets the rename out of the way before I change my mind again.

Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2014-06-05 10:21:32 -04:00