Skip to content

Commit 8eae272

Browse files
committed
ofxAndroidSoundPlayer fix missing non implemented functions
1 parent 4f92413 commit 8eae272

2 files changed

Lines changed: 32 additions & 20 deletions

File tree

addons/ofxAndroid/src/ofxAndroidSoundPlayer.cpp

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -473,3 +473,13 @@ bool ofxAndroidSoundPlayer::isLoaded() const{
473473

474474
return env->CallBooleanMethod(javaSoundPlayer,javaIsLoadedMethod);
475475
}
476+
477+
float ofxAndroidSoundPlayer::getDuration() const {
478+
ofLogError("ofxAndroidSoundPlayer") << "getDuration(): not implemented";
479+
return 0.0f;
480+
}
481+
482+
unsigned int ofxAndroidSoundPlayer::getDurationMS() const {
483+
ofLogError("ofxAndroidSoundPlayer") << "getDurationMS(): not implemented";
484+
return 0;
485+
}

addons/ofxAndroid/src/ofxAndroidSoundPlayer.h

Lines changed: 22 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -6,30 +6,32 @@
66
class ofxAndroidSoundPlayer: public ofBaseSoundPlayer{
77
public:
88
ofxAndroidSoundPlayer();
9-
~ofxAndroidSoundPlayer();
9+
~ofxAndroidSoundPlayer() override;
1010

11-
bool load(const of::filesystem::path& fileName, bool stream = false);
12-
void unload();
13-
void play();
14-
void stop();
11+
bool load(const of::filesystem::path& fileName, bool stream) override;
12+
void unload() override;
13+
void play() override;
14+
void stop() override;
1515

16-
void setVolume(float vol);
17-
void setPan(float vol);
18-
void setSpeed(float spd);
19-
void setPaused(bool bP);
20-
void setLoop(bool bLp);
21-
void setMultiPlay(bool bMp);
22-
void setPosition(float pct); // 0 = start, 1 = end;
23-
void setPositionMS(int ms);
16+
void setVolume(float vol) override;
17+
void setPan(float vol) override;
18+
void setSpeed(float spd) override;
19+
void setPaused(bool bP) override;
20+
void setLoop(bool bLp) override;
21+
void setMultiPlay(bool bMp) override;
22+
void setPosition(float pct) override; // 0 = start, 1 = end;
23+
void setPositionMS(int ms) override;
2424

25-
float getPosition() const;
26-
int getPositionMS() const;
27-
bool isPlaying() const;
28-
float getSpeed() const;
29-
float getPan() const;
25+
float getPosition() const override;
26+
int getPositionMS() const override;
27+
bool isPlaying() const override;
28+
float getSpeed() const override;
29+
float getPan() const override;
3030
bool isPaused() const;
31-
float getVolume() const;
32-
bool isLoaded() const;
31+
float getVolume() const override;
32+
bool isLoaded() const override;
33+
float getDuration() const override;
34+
unsigned int getDurationMS() const override;
3335

3436
private:
3537
jobject javaSoundPlayer;

0 commit comments

Comments
 (0)