- removed a few dependencies of the Timidity++ code from the main GZDoom code base.
The big issues, i.e. FileReader and SoundFontReader still need to be handled to make this a standalone library.
This commit is contained in:
parent
b3a9884eb1
commit
df7a4bb0d9
6 changed files with 265 additions and 15 deletions
|
|
@ -26,7 +26,6 @@
|
|||
|
||||
#include <string.h>
|
||||
#include <ctype.h>
|
||||
#include "m_random.h"
|
||||
#include "common.h"
|
||||
|
||||
namespace TimidityPlus
|
||||
|
|
@ -113,16 +112,19 @@ int string_to_7bit_range(const char *string_, int *start, int *end)
|
|||
}
|
||||
|
||||
|
||||
static FRandom pr_rnd;
|
||||
double GenRand_Real1()
|
||||
{
|
||||
return rand() * (1. / RAND_MAX);
|
||||
}
|
||||
|
||||
int int_rand(int n)
|
||||
{
|
||||
return (int)pr_rnd.GenRand_Real1() * n;
|
||||
return (int)GenRand_Real1() * n;
|
||||
}
|
||||
|
||||
double flt_rand()
|
||||
{
|
||||
return (int)pr_rnd.GenRand_Real1();
|
||||
return (int)GenRand_Real1();
|
||||
}
|
||||
|
||||
struct timidity_file *open_file(const char *name, FSoundFontReader *sfreader)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue