replace strcasecmp with FLUID_STRCASECMP

This commit is contained in:
derselbst 2017-10-15 20:16:04 +02:00
parent 458cb94b93
commit 64b929ced6
5 changed files with 9 additions and 7 deletions

View File

@ -5,8 +5,6 @@
#define DSOUND_SUPPORT 1 #define DSOUND_SUPPORT 1
#define WINMIDI_SUPPORT 1 #define WINMIDI_SUPPORT 1
#define strcasecmp _stricmp
#define STDIN_FILENO 0 #define STDIN_FILENO 0
#define STDOUT_FILENO 1 #define STDOUT_FILENO 1
#define STDERR_FILENO 2 #define STDERR_FILENO 2

View File

@ -221,7 +221,7 @@ new_fluid_core_audio_driver2(fluid_settings_t* settings, fluid_audio_func_t func
size = sizeof (name); size = sizeof (name);
pa.mSelector = kAudioDevicePropertyDeviceName; pa.mSelector = kAudioDevicePropertyDeviceName;
if (OK (AudioObjectGetPropertyData (devs[i], &pa, 0, 0, &size, name))) { if (OK (AudioObjectGetPropertyData (devs[i], &pa, 0, 0, &size, name))) {
if (get_num_outputs (devs[i]) > 0 && strcasecmp(devname, name) == 0) { if (get_num_outputs (devs[i]) > 0 && FLUID_STRCASECMP(devname, name) == 0) {
AudioDeviceID selectedID = devs[i]; AudioDeviceID selectedID = devs[i];
status = AudioUnitSetProperty (dev->outputUnit, status = AudioUnitSetProperty (dev->outputUnit,
kAudioOutputUnitProperty_CurrentDevice, kAudioOutputUnitProperty_CurrentDevice,

View File

@ -76,7 +76,7 @@ fluid_dsound_enum_callback2(LPGUID guid, LPCTSTR description, LPCTSTR module, LP
{ {
fluid_dsound_devsel_t* devsel = (fluid_dsound_devsel_t*) context; fluid_dsound_devsel_t* devsel = (fluid_dsound_devsel_t*) context;
FLUID_LOG(FLUID_DBG, "Testing audio device: %s", description); FLUID_LOG(FLUID_DBG, "Testing audio device: %s", description);
if (strcasecmp(devsel->devname, description) == 0) { if (FLUID_STRCASECMP(devsel->devname, description) == 0) {
devsel->devGUID = FLUID_NEW(GUID); devsel->devGUID = FLUID_NEW(GUID);
if(devsel->devGUID) { if(devsel->devGUID) {
memcpy(devsel->devGUID, guid, sizeof(GUID)); memcpy(devsel->devGUID, guid, sizeof(GUID));

View File

@ -150,12 +150,12 @@ new_fluid_winmidi_driver(fluid_settings_t* settings,
} }
/* find the device */ /* find the device */
if (strcasecmp("default", devname) != 0) { if (FLUID_STRCASECMP("default", devname) != 0) {
for (i = 0; i < num; i++) { for (i = 0; i < num; i++) {
res = midiInGetDevCaps(i, &in_caps, sizeof(MIDIINCAPS)); res = midiInGetDevCaps(i, &in_caps, sizeof(MIDIINCAPS));
if (res == MMSYSERR_NOERROR) { if (res == MMSYSERR_NOERROR) {
FLUID_LOG(FLUID_DBG, "Testing midi device: %s\n", in_caps.szPname); FLUID_LOG(FLUID_DBG, "Testing midi device: %s\n", in_caps.szPname);
if (strcasecmp(devname, in_caps.szPname) == 0) { if (FLUID_STRCASECMP(devname, in_caps.szPname) == 0) {
FLUID_LOG(FLUID_DBG, "Selected midi device number: %d\n", i); FLUID_LOG(FLUID_DBG, "Selected midi device number: %d\n", i);
midi_num = i; midi_num = i;
break; break;

View File

@ -254,7 +254,11 @@ typedef FILE* fluid_file;
#define FLUID_VSNPRINTF vsnprintf #define FLUID_VSNPRINTF vsnprintf
#endif #endif
#if defined(WIN32) && !defined(MINGW32)
#define FLUID_STRCASECMP _stricmp
#else
#define FLUID_STRCASECMP strcasecmp
#endif
#define fluid_clip(_val, _min, _max) \ #define fluid_clip(_val, _min, _max) \