design: Move audio section

I want it listed last so I can select songs from a library or playlist
to play.

Signed-off-by: Anna Schumaker <schumaker.anna@gmail.com>
This commit is contained in:
Bryan Schumaker 2013-08-07 21:07:07 -04:00 committed by Anna Schumaker
parent 8c4e515145
commit b248300d01
2 changed files with 47 additions and 45 deletions

View File

@ -67,13 +67,15 @@ Install:
Printing: (include/print.h>
Sometimes text needs to be printed to the screen so users (or debuggers)
know what is going on.
know what is going on. Enabling dprint() when CONFIG_TEST is enabled
means I will only need a single test.good file for output comparing.
API:
void print(string fmt, ...)
Print text to the screen
Print text to the screen.
void dprint(string fmt, ...)
Print text to the screen when debugging is enabled
Print text to the screen when debugging or testing is enabled.
@ -100,47 +102,6 @@ API:
Audio: (lib/audio.cpp)
This file will introduce an "audio" namespace containing all of the
functions interacting with gstreamer. This will create a wrapper
namespace that will be easier to work with than using raw gstreamer
functions.
The audio layer will also control the "pause after N tracks" feature
so songs can be loaded without neeting to pass in a "begin playback"
flag every time.
- Internal:
Set up a message bus to look for end-of-stream and error messages so
the next song can be played. This function should call the play
function after loading a track and after checking the "pause after N"
count.
- API:
audio :: init(argc, argv)
Initialize the gstreamer layer and reload the track that was
last loaded before shutdown. Please only pass --gst-* options
for argv.
audio :: load_file(filepath)
Loads a file path but does not begin playback.
audio :: play()
Begin playback
audio :: pause()
Pause playback
audio :: seek_to(X)
Seek to a position X seconds into the track
audio :: stop()
pause()
seek_to(0)
audio :: pause_after(N)
Pause after N tracks, pass a negative number to disable.
audio :: position()
Return the number of seconds that the song has played
audio :: duration()
Return the duration of the current song in seconds
On-disk files: (lib/file.cpp)
Data will be stored in the user's home directory according to the
XDG / freedesktop.org specification. This means storing data in
@ -657,6 +618,47 @@ Playlist: (lib/playlist.cpp)
Audio: (lib/audio.cpp)
This file will introduce an "audio" namespace containing all of the
functions interacting with gstreamer. This will create a wrapper
namespace that will be easier to work with than using raw gstreamer
functions.
The audio layer will also control the "pause after N tracks" feature
so songs can be loaded without neeting to pass in a "begin playback"
flag every time.
- Internal:
Set up a message bus to look for end-of-stream and error messages so
the next song can be played. This function should call the play
function after loading a track and after checking the "pause after N"
count.
- API:
audio :: init(argc, argv)
Initialize the gstreamer layer and reload the track that was
last loaded before shutdown. Please only pass --gst-* options
for argv.
audio :: load_file(filepath)
Loads a file path but does not begin playback.
audio :: play()
Begin playback
audio :: pause()
Pause playback
audio :: seek_to(X)
Seek to a position X seconds into the track
audio :: stop()
pause()
seek_to(0)
audio :: pause_after(N)
Pause after N tracks, pass a negative number to disable.
audio :: position()
Return the number of seconds that the song has played
audio :: duration()
Return the duration of the current song in seconds
Preferences: (lib/prefs.cpp)
Preferences make use of a special index where the set<int> is always
size 1. Preferences will be in the prefs namespace.

View File

@ -5,7 +5,7 @@
audio.cpp
== Depends ==
version print
playlist
Audio: (lib/audio.cpp)
This file will introduce an "audio" namespace containing all of the