bullet3/examples/TinyAudio/b3SoundSource.h
Erwin Coumans 943dd16e78 disable keyboard repeat on Windows
add some TinyAudio classes to play wav, mostly from Stk (http://github.com/thestk/stk)
2017-04-26 21:31:01 -07:00

29 lines
700 B
C++

#ifndef B3_SOUND_SOURCE_H
#define B3_SOUND_SOURCE_H
class b3SoundSource
{
struct b3SoundSourceInternalData* m_data;
public:
b3SoundSource();
virtual ~b3SoundSource();
virtual bool computeSamples(double *sampleBuffer, int numSamples, double sampleRate);
int getNumOscillators() const;
void setOscillatorType(int oscillatorIndex, int type);
void setOscillatorFrequency(int oscillatorIndex, double frequency);
void setOscillatorAmplitude(int oscillatorIndex, double amplitude);
void setOscillatorPhase(int oscillatorIndex, double phase);
bool setWavFile(int oscillatorIndex, const char* fileName, int sampleRate);
void startSound();
void stopSound();
};
#endif //B3_SOUND_SOURCE_H