Add Database and refactor player/playback
Add Database class with SQLite fetch/fetchAlbum methods. Refactor PlaybackEngine (data callback, seek, getPosition, decoder lifecycle) and Player API (PlaybackEngine member, queue handling, PlayerLocal). Update Metadata::Track fields to include artist/title/album/trackNr/length.
This commit is contained in:
@@ -11,10 +11,13 @@ class PlayerEngine {
|
||||
unsigned int sampleRate_;
|
||||
unsigned int channels_ = 2;
|
||||
ma_format format_ = ma_format_unknown;
|
||||
ma_context context_;
|
||||
|
||||
|
||||
public:
|
||||
PlayerEngine();
|
||||
PlayerEngine( unsigned int sampleRate, unsigned int channels, ma_format format );
|
||||
~PlayerEngine();
|
||||
ma_device getDevice() const;
|
||||
unsigned int getChannels() const;
|
||||
unsigned int getSampleRate() const;
|
||||
@@ -24,4 +27,10 @@ class PlayerEngine {
|
||||
void setSampleRate( unsigned int sampleRate );
|
||||
void setChannels( unsigned int channels );
|
||||
void setFormat( ma_format format );
|
||||
|
||||
ma_device_data_proc data_callback();
|
||||
void configureDevice( ma_context& context );
|
||||
void initDevice ();
|
||||
void initEngine();
|
||||
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user