audio: Update doxygen documentation

And remove the Audio section of the DESIGN file.

Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
This commit is contained in:
Anna Schumaker 2014-12-19 13:45:34 -05:00
parent 326865f6be
commit 4a57b170cd
3 changed files with 9 additions and 90 deletions

72
DESIGN
View File

@ -66,78 +66,6 @@ Callbacks:
Audio:
The audio layer uses the configured driver to control audio playback.
Gstreamer options passed to audio :: init() can be found by running
`gst-inspect-1.0 --help-gst` on the command line.
- File:
File cur_track("cur_track");
File << current_track->id << endl;
- API:
void audio :: init(int *argc, char ***argv);
Initialize the audio driver through argc and argv. Read in
the current track file and load the track.
void audio :: play();
void audio :: pause();
void audio :: seek_to(long pos);
Call the corresponding function from the audio driver, but only
if a track is loaded.
void audio :: stop();
pause()
seek_to(0)
long audio :: position();
long audio :: duration();
Call the corresponding function from the audio driver. Return
0 if no track is currently loaded.
std::string audio :: position_str();
Return the current audio position in string form.
Return an empty string if there is no current track.
void audio :: next();
Call the deck :: next() function to get the next track that
should be played and use the audio driver to load the track.
Save that track's ID to the cur_track file.
void audio :: prev();
Call the deck :: previous() function to find a new track to
play and use the audio driver to load the track.
Save that track's ID to the cur_track file.
void audio :: load_track(Track *track);
Load the requested track.
Save that track's ID to the cur_track file.
Track *audio :: current_track();
Return the currently playing Track.
Return NULL if there is no current track.
void audio :: pause_after(bool enabled, unsigned int N);
If enabled == true:
Configure Ocarina to pause playback after N tracks
have been played.
If enabled == false:
Do not automatically pause.
If N is greater than the current pause count then enabled should
be set to true.
bool audio :: pause_enabled();
unsigned int audio :: pause_count();
Use these functions to access the current "pause after N" state.
Gui: (ocarina/*)
The GUI will be written in C++ using gtkmm3 for (hopefully) cleaner code.

View File

@ -22,15 +22,8 @@ namespace audio
*/
void init(int *, char ***);
/**
* Begin playback.
*/
void play();
/**
* Pause playback.
*/
void pause();
void play(); /** Begin playback. */
void pause(); /** Pause playback. */
/**
* Seek to a specific point in the track.
@ -59,18 +52,13 @@ namespace audio
*/
std::string position_str();
/**
* Find and load the next track that should be played.
*/
void next();
/**
* Call the deck :: previous() function and load the result.
*/
void prev();
void next(); /** Find and load the next track that should be played. */
void prev(); /** Call the deck :: previous() function and load the result. */
/**
* Load a specific track for playback.
*
* @param track The track that should be loaded.
*/
void load_track(Track *track);

View File

@ -118,6 +118,9 @@ public:
/**
* Driver for the GStreamer audio library.
*
* The shell command `gst-inspect-1.0 --help-gst` details the command line
* options that can be passed to Ocarina.
*/
class GSTDriver : public Driver
{