mirror of https://github.com/ZDoom/fluidsynth.git
fix some type conversion warnings in MSVC (#903)
This commit is contained in:
parent
17fb48def5
commit
20e09bb76d
|
@ -19,6 +19,8 @@
|
||||||
#if defined(WIN32)
|
#if defined(WIN32)
|
||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
#define sleep(_t) Sleep(_t * 1000)
|
#define sleep(_t) Sleep(_t * 1000)
|
||||||
|
#include <process.h>
|
||||||
|
#define getpid _getpid
|
||||||
#else
|
#else
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
|
|
|
@ -71,7 +71,8 @@ schedule_timer_event(void)
|
||||||
void
|
void
|
||||||
schedule_pattern(void)
|
schedule_pattern(void)
|
||||||
{
|
{
|
||||||
int i, note_time, note_duration;
|
unsigned int i;
|
||||||
|
int note_time, note_duration;
|
||||||
note_time = time_marker;
|
note_time = time_marker;
|
||||||
note_duration = duration / pattern_size;
|
note_duration = duration / pattern_size;
|
||||||
|
|
||||||
|
@ -135,7 +136,7 @@ main(int argc, char *argv[])
|
||||||
{
|
{
|
||||||
n = atoi(argv[2]);
|
n = atoi(argv[2]);
|
||||||
|
|
||||||
if((n > 1) && (n <= pattern_size))
|
if((n > 1) && (n <= (int)pattern_size))
|
||||||
{
|
{
|
||||||
pattern_size = n;
|
pattern_size = n;
|
||||||
}
|
}
|
||||||
|
|
|
@ -141,7 +141,7 @@ int main(int argc, char **argv)
|
||||||
|
|
||||||
/* Fill in the data of the effects unit */
|
/* Fill in the data of the effects unit */
|
||||||
fx_data.synth = synth;
|
fx_data.synth = synth;
|
||||||
fx_data.gain = atof(argv[2]);
|
fx_data.gain = (float)atof(argv[2]);
|
||||||
|
|
||||||
/* Create the audio driver. As soon as the audio driver is
|
/* Create the audio driver. As soon as the audio driver is
|
||||||
* created, the synthesizer can be played. */
|
* created, the synthesizer can be played. */
|
||||||
|
|
|
@ -61,7 +61,8 @@ schedule_timer_event(void)
|
||||||
void
|
void
|
||||||
schedule_pattern(void)
|
schedule_pattern(void)
|
||||||
{
|
{
|
||||||
int i, note_time;
|
unsigned int i;
|
||||||
|
int note_time;
|
||||||
note_time = time_marker;
|
note_time = time_marker;
|
||||||
|
|
||||||
for(i = 0; i < pattern_size; ++i)
|
for(i = 0; i < pattern_size; ++i)
|
||||||
|
|
Loading…
Reference in New Issue