mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-07-12 15:14:35 +00:00
update bullet so it actually works
Moved the addSourceDirectory for physics/Bullet into the Engine/Source/CMakeLists.txt file that way it can actually appear where we expect it to in the solution explorer.
This commit is contained in:
parent
c7be48130a
commit
13fa178cf6
5986 changed files with 1811270 additions and 453803 deletions
53
Engine/lib/bullet/examples/TinyAudio/b3ReadWavFile.h
Normal file
53
Engine/lib/bullet/examples/TinyAudio/b3ReadWavFile.h
Normal file
|
|
@ -0,0 +1,53 @@
|
|||
#ifndef B3_READ_WAV_FILE_H
|
||||
#define B3_READ_WAV_FILE_H
|
||||
|
||||
#include "Bullet3Common/b3AlignedObjectArray.h"
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
|
||||
struct b3WavTicker
|
||||
{
|
||||
b3AlignedObjectArray<double> lastFrame_;
|
||||
bool finished_;
|
||||
double time_;
|
||||
double rate_;
|
||||
};
|
||||
|
||||
class b3ReadWavFile
|
||||
{
|
||||
bool byteswap_;
|
||||
bool wavFile_;
|
||||
unsigned long m_numFrames;
|
||||
unsigned long dataType_;
|
||||
double fileDataRate_;
|
||||
FILE *fd_;
|
||||
unsigned long dataOffset_;
|
||||
unsigned int channels_;
|
||||
bool m_machineIsLittleEndian;
|
||||
|
||||
public:
|
||||
b3ReadWavFile();
|
||||
virtual ~b3ReadWavFile();
|
||||
|
||||
b3AlignedObjectArray<double> m_frames;
|
||||
|
||||
bool getWavInfo(const char *fileName);
|
||||
|
||||
void normalize(double peak);
|
||||
|
||||
double interpolate(double frame, unsigned int channel) const;
|
||||
double tick(unsigned int channel, b3WavTicker *ticker);
|
||||
|
||||
void resize();
|
||||
|
||||
b3WavTicker createWavTicker(double sampleRate);
|
||||
|
||||
bool read(unsigned long startFrame, bool doNormalize);
|
||||
|
||||
int getNumFrames() const
|
||||
{
|
||||
return m_numFrames;
|
||||
}
|
||||
};
|
||||
|
||||
#endif //B3_READ_WAV_FILE_H
|
||||
Loading…
Add table
Add a link
Reference in a new issue