Struct musdata
Defined in File musicDB.hpp
Struct Documentation
-
struct musdata
the music meta data’s struct
Public Functions
-
musdata(stmt *dbstate)
Constructor. typically used for returning search results.
- Parameters:
dbstate – the sqlite statement
-
musdata(const std::string &title__ = "", const std::string &composer__ = "", const std::string &musicPath__ = "", const double bpm__ = -1.0)
Constructor used for filtering music entries.
Use this constructor to specify filtering conditions for a search query. Leave parameters blank (or set to a negative value for bpm) if filtering by that field is not required.
- Parameters:
title__ – The title of the music.
composer__ – The composer of the music.
musicPath__ – Path to the music file, relative to the root of the database.
bpm__ – The BPM (beats per minute) of the music. Use a negative value to ignore this field.
-
bool GenSearchSTMT(stmt &dbstate, sqlite3 *db)
generates the search statement
- Parameters:
dbstate – statement pointer
db – Root DB
- Returns:
true
- Returns:
false
Public Members
-
std::string title
-
std::string composer
-
std::string musicPath
-
double bpm = -1.0
-
std::string firstBar
this means the first beat’s position. The measurement unit is a PCM frame. For higher precision, double value is stored as strings in Cap’n Proto, so the corresponding variable is also a string.
-
musdata(stmt *dbstate)