Skip to content

Commit

Permalink
ofOpenALSoundPlayer: fix conflicting forward declaration in newer ver…
Browse files Browse the repository at this point in the history
…sions (#6498)

Declare statics inside cpp to avoid forward declaration

#changelog #linux
  • Loading branch information
arturoc committed Dec 9, 2019
1 parent 2144658 commit 2bee6a3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 12 deletions.
8 changes: 4 additions & 4 deletions libs/openFrameworks/sound/ofOpenALSoundPlayer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,10 @@

using namespace std;

ALCdevice * ofOpenALSoundPlayer::alDevice = 0;
ALCcontext * ofOpenALSoundPlayer::alContext = 0;
static ALCdevice * alDevice = nullptr;
static ALCcontext * alContext = nullptr;
vector<float> ofOpenALSoundPlayer::window;
float ofOpenALSoundPlayer::windowSum=0;
float ofOpenALSoundPlayer::windowSum = 0.f;


kiss_fftr_cfg ofOpenALSoundPlayer::systemFftCfg=0;
Expand All @@ -40,7 +40,7 @@ static set<ofOpenALSoundPlayer*> & players(){
}

void ofOpenALSoundUpdate(){
alcProcessContext(ofOpenALSoundPlayer::alContext);
alcProcessContext(alContext);
}

// ----------------------------------------------------------------------------
Expand Down
8 changes: 0 additions & 8 deletions libs/openFrameworks/sound/ofOpenALSoundPlayer.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,6 @@


typedef unsigned int ALuint;
/** Opaque device handle */
typedef struct ALCdevice_struct ALCdevice;
/** Opaque context handle */
typedef struct ALCcontext_struct ALCcontext;



#include "kiss_fft.h"
#include "kiss_fftr.h"
Expand Down Expand Up @@ -123,8 +117,6 @@ class ofOpenALSoundPlayer : public ofBaseSoundPlayer, public ofThread {
float speed; // -n to n, 1 = normal, -1 backwards
unsigned int length; // in samples;

static ALCdevice * alDevice;
static ALCcontext * alContext;
static std::vector<float> window;
static float windowSum;

Expand Down

0 comments on commit 2bee6a3

Please sign in to comment.