Error and warning cleanup for macOS (and Linux)

This commit is contained in:
Casey Langen 2017-10-08 20:49:09 -07:00
parent 8c1627c4e3
commit cd4e15555f
8 changed files with 79 additions and 80 deletions

View File

@ -35,7 +35,6 @@ set(CORE_SOURCES
./library/track/LibraryTrack.cpp
./library/track/Track.cpp
./library/track/TrackList.cpp
./library/track/RetainedTrack.cpp
./plugin/PluginFactory.cpp
./plugin/Plugins.cpp
./runtime/Message.cpp

View File

@ -75,36 +75,36 @@ namespace musik { namespace core { namespace audio {
~PlaybackService();
/* IMessageTarget */
virtual void ProcessMessage(musik::core::runtime::IMessage &message);
virtual void ProcessMessage(musik::core::runtime::IMessage &message) override;
/* IPlaybackService */
virtual void Play(size_t index);
virtual bool Next();
virtual bool Previous();
virtual void Stop() { transport.Stop(); }
virtual musik::core::sdk::RepeatMode GetRepeatMode() { return this->repeatMode; }
virtual void SetRepeatMode(musik::core::sdk::RepeatMode mode);
virtual void ToggleRepeatMode();
virtual musik::core::sdk::PlaybackState GetPlaybackState();
virtual bool IsShuffled();
virtual void ToggleShuffle();
virtual size_t GetIndex();
virtual size_t Count();
virtual double GetVolume();
virtual void SetVolume(double vol);
virtual void PauseOrResume();
virtual bool IsMuted();
virtual void ToggleMute();
virtual double GetPosition();
virtual void SetPosition(double seconds);
virtual double GetDuration();
virtual musik::core::sdk::ITrack* GetTrack(size_t index);
virtual musik::core::sdk::ITrack* GetPlayingTrack();
virtual void CopyFrom(const musik::core::sdk::ITrackList* source);
virtual void Play(const musik::core::sdk::ITrackList* source, size_t index);
virtual musik::core::sdk::ITrackListEditor* EditPlaylist();
virtual musik::core::sdk::TimeChangeMode GetTimeChangeMode();
virtual void SetTimeChangeMode(musik::core::sdk::TimeChangeMode);
virtual void Play(size_t index) override;
virtual bool Next() override;
virtual bool Previous() override;
virtual void Stop() override { transport.Stop(); }
virtual musik::core::sdk::RepeatMode GetRepeatMode() override { return this->repeatMode; }
virtual void SetRepeatMode(musik::core::sdk::RepeatMode mode) override;
virtual void ToggleRepeatMode() override;
virtual musik::core::sdk::PlaybackState GetPlaybackState() override;
virtual bool IsShuffled() override;
virtual void ToggleShuffle() override;
virtual size_t GetIndex() override;
virtual size_t Count() override;
virtual double GetVolume() override;
virtual void SetVolume(double vol) override;
virtual void PauseOrResume() override;
virtual bool IsMuted() override;
virtual void ToggleMute() override;
virtual double GetPosition() override;
virtual void SetPosition(double seconds) override;
virtual double GetDuration() override;
virtual musik::core::sdk::ITrack* GetTrack(size_t index) override;
virtual musik::core::sdk::ITrack* GetPlayingTrack() override;
virtual void CopyFrom(const musik::core::sdk::ITrackList* source) override;
virtual void Play(const musik::core::sdk::ITrackList* source, size_t index) override;
virtual musik::core::sdk::ITrackListEditor* EditPlaylist() override;
virtual musik::core::sdk::TimeChangeMode GetTimeChangeMode() override;
virtual void SetTimeChangeMode(musik::core::sdk::TimeChangeMode) override;
/* TODO: include in SDK? */
virtual bool HotSwap(const TrackList& source, size_t index = 0);
@ -134,14 +134,14 @@ namespace musik { namespace core { namespace audio {
virtual ~Editor();
/* ITrackListEditor */
virtual bool Insert(int64_t id, size_t index);
virtual bool Swap(size_t index1, size_t index2);
virtual bool Move(size_t from, size_t to);
virtual bool Delete(size_t index);
virtual void Add(const int64_t id);
virtual void Clear();
virtual void Shuffle();
virtual void Release();
virtual bool Insert(int64_t id, size_t index) override;
virtual bool Swap(size_t index1, size_t index2) override;
virtual bool Move(size_t from, size_t to) override;
virtual bool Delete(size_t index) override;
virtual void Add(const int64_t id) override;
virtual void Clear() override;
virtual void Shuffle() override;
virtual void Release() override;
private:
friend class PlaybackService;

View File

@ -52,11 +52,11 @@ class SdkWrapper : public Track {
}
virtual void Retain() {
virtual void Retain() override {
++this->count;
}
virtual void Release() {
virtual void Release() override {
int c = this->count.fetch_sub(1);
if (c == 1) { /* fetched before sub */
this->count = 0;
@ -65,35 +65,35 @@ class SdkWrapper : public Track {
}
}
virtual int GetString(const char* key, char* dst, int size) {
virtual int GetString(const char* key, char* dst, int size) override {
return track->GetString(key, dst, size);
}
virtual long long GetInt64(const char* key, long long defaultValue) {
virtual long long GetInt64(const char* key, long long defaultValue) override {
return track->GetInt64(key, defaultValue);
}
virtual int GetInt32(const char* key, unsigned int defaultValue) {
virtual int GetInt32(const char* key, unsigned int defaultValue) override {
return track->GetInt32(key, defaultValue);
}
virtual double GetDouble(const char* key, double defaultValue) {
virtual double GetDouble(const char* key, double defaultValue) override {
return track->GetDouble(key, defaultValue);
}
virtual int Uri(char* dst, int size) {
virtual int Uri(char* dst, int size) override {
return track->Uri(dst, size);
}
virtual musik::core::sdk::IResource::Class GetClass() {
virtual musik::core::sdk::IResource::Class GetClass() override {
return track->GetClass();
}
virtual const char* GetType() {
virtual const char* GetType() override {
return track->GetType();
}
virtual size_t GetValue(char* dst, size_t size) {
virtual size_t GetValue(char* dst, size_t size) override {
return track->GetValue(dst, size);
}

View File

@ -77,14 +77,14 @@ namespace musik { namespace core {
/* IMap */
virtual void Release() override;
virtual int GetString(const char* key, char* dst, int size) = 0;
virtual long long GetInt64(const char* key, long long defaultValue = 0LL) = 0;
virtual int GetInt32(const char* key, unsigned int defaultValue = 0) = 0;
virtual double GetDouble(const char* key, double defaultValue = 0.0f) = 0;
virtual int GetString(const char* key, char* dst, int size) override = 0;
virtual long long GetInt64(const char* key, long long defaultValue = 0LL) override = 0;
virtual int GetInt32(const char* key, unsigned int defaultValue = 0) override = 0;
virtual double GetDouble(const char* key, double defaultValue = 0.0f) override = 0;
/* ITrack */
virtual void Retain() override;
virtual int Uri(char* dst, int size) = 0;
virtual int Uri(char* dst, int size) override = 0;
/* implementation specific */
virtual void SetId(int64_t id) = 0;

View File

@ -42,15 +42,15 @@
class AlsaPlugin : public musik::core::sdk::IPlugin {
public:
virtual void Destroy() { delete this; }
virtual const char* Name() { return "AlsaOut IOutput"; }
virtual const char* Version() { return "0.5.0"; }
virtual const char* Author() { return "Julian Cromarty, clangen"; }
virtual const char* Guid() { return "668a75e6-1816-4c75-a361-a9d48906f23f"; }
virtual bool Configurable() { return false; }
virtual void Configure() { }
virtual void Reload() { }
virtual int SdkVersion() { return musik::core::sdk::SdkVersion; }
virtual void Release() override { delete this; }
virtual const char* Name() override { return "AlsaOut IOutput"; }
virtual const char* Version() override { return "0.5.0"; }
virtual const char* Author() override { return "Julian Cromarty, clangen"; }
virtual const char* Guid() override { return "668a75e6-1816-4c75-a361-a9d48906f23f"; }
virtual bool Configurable() override { return false; }
virtual void Configure() override { }
virtual void Reload() override { }
virtual int SdkVersion() override { return musik::core::sdk::SdkVersion; }
};
extern "C" musik::core::sdk::IPlugin* GetPlugin() {

View File

@ -40,15 +40,15 @@
class CoreAudioPlugin : public musik::core::sdk::IPlugin {
public:
virtual void Destroy() { delete this; }
virtual const char* Name() { return "CoreAudio IOutput"; }
virtual const char* Version() { return "0.5.0"; }
virtual const char* Author() { return "clangen"; }
virtual const char* Guid() { return "7277a19f-a5f7-4123-ac2d-c36273097b72"; }
virtual bool Configurable() { return false; }
virtual void Configure() { }
virtual void Reload() { }
virtual int SdkVersion() { return musik::core::sdk::SdkVersion; }
virtual void Release() override { delete this; }
virtual const char* Name() override { return "CoreAudio IOutput"; }
virtual const char* Version() override { return "0.5.0"; }
virtual const char* Author() override { return "clangen"; }
virtual const char* Guid() override { return "7277a19f-a5f7-4123-ac2d-c36273097b72"; }
virtual bool Configurable() override { return false; }
virtual void Configure() override { }
virtual void Reload() override { }
virtual int SdkVersion() override { return musik::core::sdk::SdkVersion; }
};
extern "C" musik::core::sdk::IPlugin* GetPlugin() {

View File

@ -50,7 +50,7 @@ class OggDecoder : public IDecoder {
virtual bool GetBuffer(IBuffer *buffer) override;
virtual double GetDuration() override;
virtual bool Open(musik::core::sdk::IDataStream *fileStream) override;
virtual bool Exhausted() { return this->exhausted; }
virtual bool Exhausted() override { return this->exhausted; }
/* libvorbis callbacks */
static size_t OggRead(void *buffer, size_t nofParts, size_t partSize, void *datasource);

View File

@ -42,15 +42,15 @@
class PulsePlugin : public musik::core::sdk::IPlugin {
public:
virtual void Destroy() { delete this; }
virtual const char* Name() { return "PulseAudio IOutput"; }
virtual const char* Version() { return "0.5.0"; }
virtual const char* Author() { return "clangen"; }
virtual const char* Guid() { return "67c7e90b-5123-41c0-b03a-838ecd6cb8b5"; }
virtual bool Configurable() { return false; }
virtual void Configure() { }
virtual void Reload() { }
virtual int SdkVersion() { return musik::core::sdk::SdkVersion; }
virtual void Release() override { delete this; }
virtual const char* Name() override { return "PulseAudio IOutput"; }
virtual const char* Version() override { return "0.5.0"; }
virtual const char* Author() override { return "clangen"; }
virtual const char* Guid() override { return "67c7e90b-5123-41c0-b03a-838ecd6cb8b5"; }
virtual bool Configurable() override { return false; }
virtual void Configure() override { }
virtual void Reload() override { }
virtual int SdkVersion() override { return musik::core::sdk::SdkVersion; }
};
extern "C" musik::core::sdk::IPlugin* GetPlugin() {