mirror of
https://github.com/bulletphysics/bullet3
synced 2024-12-15 14:10:11 +00:00
943dd16e78
add some TinyAudio classes to play wav, mostly from Stk (http://github.com/thestk/stk)
29 lines
700 B
C++
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
|