mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2024-11-11 15:22:15 +00:00
- Fixed C++11 warnings from recent commits.
This commit is contained in:
parent
47e7a30cab
commit
346fcf584c
2 changed files with 23 additions and 23 deletions
|
@ -113,7 +113,7 @@ public:
|
||||||
BYTE chipnum = reg >> 8;
|
BYTE chipnum = reg >> 8;
|
||||||
if (chipnum != CurChip)
|
if (chipnum != CurChip)
|
||||||
{
|
{
|
||||||
BYTE switcher[2] = { chipnum + 1, 2 };
|
BYTE switcher[2] = { (BYTE)(chipnum + 1), 2 };
|
||||||
fwrite(switcher, 1, 2, File);
|
fwrite(switcher, 1, 2, File);
|
||||||
}
|
}
|
||||||
reg &= 255;
|
reg &= 255;
|
||||||
|
@ -192,7 +192,7 @@ public:
|
||||||
"\0\0\0\0" // Total milliseconds
|
"\0\0\0\0" // Total milliseconds
|
||||||
"\0\0\0", // Total data
|
"\0\0\0", // Total data
|
||||||
1, 20, File);
|
1, 20, File);
|
||||||
char type[4] = { Dual * 2, 0, 0, 0 }; // Single or dual OPL-2
|
char type[4] = { (char)(Dual * 2), 0, 0, 0 }; // Single or dual OPL-2
|
||||||
fwrite(type, 1, 4, File);
|
fwrite(type, 1, 4, File);
|
||||||
}
|
}
|
||||||
virtual ~OPL_DOSBOXdump()
|
virtual ~OPL_DOSBOXdump()
|
||||||
|
|
|
@ -634,7 +634,7 @@ ALCdevice *OpenALSoundRenderer::InitDevice()
|
||||||
{
|
{
|
||||||
device = alcOpenDevice(*snd_aldevice);
|
device = alcOpenDevice(*snd_aldevice);
|
||||||
if(!device)
|
if(!device)
|
||||||
Printf(TEXTCOLOR_BLUE" Failed to open device "TEXTCOLOR_BOLD"%s"TEXTCOLOR_BLUE". Trying default.\n", *snd_aldevice);
|
Printf(TEXTCOLOR_BLUE" Failed to open device " TEXTCOLOR_BOLD"%s" TEXTCOLOR_BLUE". Trying default.\n", *snd_aldevice);
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!device)
|
if(!device)
|
||||||
|
@ -674,13 +674,13 @@ OpenALSoundRenderer::OpenALSoundRenderer()
|
||||||
current = alcGetString(Device, ALC_ALL_DEVICES_SPECIFIER);
|
current = alcGetString(Device, ALC_ALL_DEVICES_SPECIFIER);
|
||||||
if(alcGetError(Device) != ALC_NO_ERROR || !current)
|
if(alcGetError(Device) != ALC_NO_ERROR || !current)
|
||||||
current = alcGetString(Device, ALC_DEVICE_SPECIFIER);
|
current = alcGetString(Device, ALC_DEVICE_SPECIFIER);
|
||||||
Printf(" Opened device "TEXTCOLOR_ORANGE"%s\n", current);
|
Printf(" Opened device " TEXTCOLOR_ORANGE"%s\n", current);
|
||||||
|
|
||||||
ALCint major=0, minor=0;
|
ALCint major=0, minor=0;
|
||||||
alcGetIntegerv(Device, ALC_MAJOR_VERSION, 1, &major);
|
alcGetIntegerv(Device, ALC_MAJOR_VERSION, 1, &major);
|
||||||
alcGetIntegerv(Device, ALC_MINOR_VERSION, 1, &minor);
|
alcGetIntegerv(Device, ALC_MINOR_VERSION, 1, &minor);
|
||||||
DPrintf(" ALC Version: "TEXTCOLOR_BLUE"%d.%d\n", major, minor);
|
DPrintf(" ALC Version: " TEXTCOLOR_BLUE"%d.%d\n", major, minor);
|
||||||
DPrintf(" ALC Extensions: "TEXTCOLOR_ORANGE"%s\n", alcGetString(Device, ALC_EXTENSIONS));
|
DPrintf(" ALC Extensions: " TEXTCOLOR_ORANGE"%s\n", alcGetString(Device, ALC_EXTENSIONS));
|
||||||
|
|
||||||
TArray<ALCint> attribs;
|
TArray<ALCint> attribs;
|
||||||
if(*snd_samplerate > 0)
|
if(*snd_samplerate > 0)
|
||||||
|
@ -710,10 +710,10 @@ OpenALSoundRenderer::OpenALSoundRenderer()
|
||||||
}
|
}
|
||||||
attribs.Clear();
|
attribs.Clear();
|
||||||
|
|
||||||
DPrintf(" Vendor: "TEXTCOLOR_ORANGE"%s\n", alGetString(AL_VENDOR));
|
DPrintf(" Vendor: " TEXTCOLOR_ORANGE"%s\n", alGetString(AL_VENDOR));
|
||||||
DPrintf(" Renderer: "TEXTCOLOR_ORANGE"%s\n", alGetString(AL_RENDERER));
|
DPrintf(" Renderer: " TEXTCOLOR_ORANGE"%s\n", alGetString(AL_RENDERER));
|
||||||
DPrintf(" Version: "TEXTCOLOR_ORANGE"%s\n", alGetString(AL_VERSION));
|
DPrintf(" Version: " TEXTCOLOR_ORANGE"%s\n", alGetString(AL_VERSION));
|
||||||
DPrintf(" Extensions: "TEXTCOLOR_ORANGE"%s\n", alGetString(AL_EXTENSIONS));
|
DPrintf(" Extensions: " TEXTCOLOR_ORANGE"%s\n", alGetString(AL_EXTENSIONS));
|
||||||
|
|
||||||
ALC.EXT_EFX = !!alcIsExtensionPresent(Device, "ALC_EXT_EFX");
|
ALC.EXT_EFX = !!alcIsExtensionPresent(Device, "ALC_EXT_EFX");
|
||||||
ALC.EXT_disconnect = !!alcIsExtensionPresent(Device, "ALC_EXT_disconnect");;
|
ALC.EXT_disconnect = !!alcIsExtensionPresent(Device, "ALC_EXT_disconnect");;
|
||||||
|
@ -775,7 +775,7 @@ OpenALSoundRenderer::OpenALSoundRenderer()
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
FreeSfx = Sources;
|
FreeSfx = Sources;
|
||||||
DPrintf(" Allocated "TEXTCOLOR_BLUE"%u"TEXTCOLOR_NORMAL" sources\n", Sources.Size());
|
DPrintf(" Allocated " TEXTCOLOR_BLUE"%u" TEXTCOLOR_NORMAL" sources\n", Sources.Size());
|
||||||
|
|
||||||
WasInWater = false;
|
WasInWater = false;
|
||||||
if(*snd_efx && ALC.EXT_EFX)
|
if(*snd_efx && ALC.EXT_EFX)
|
||||||
|
@ -1735,7 +1735,7 @@ float OpenALSoundRenderer::GetAudibility(FISoundChannel *chan)
|
||||||
|
|
||||||
void OpenALSoundRenderer::PrintStatus()
|
void OpenALSoundRenderer::PrintStatus()
|
||||||
{
|
{
|
||||||
Printf("Output device: "TEXTCOLOR_ORANGE"%s\n", alcGetString(Device, ALC_DEVICE_SPECIFIER));
|
Printf("Output device: " TEXTCOLOR_ORANGE"%s\n", alcGetString(Device, ALC_DEVICE_SPECIFIER));
|
||||||
getALCError(Device);
|
getALCError(Device);
|
||||||
|
|
||||||
ALCint frequency, major, minor, mono, stereo;
|
ALCint frequency, major, minor, mono, stereo;
|
||||||
|
@ -1746,10 +1746,10 @@ void OpenALSoundRenderer::PrintStatus()
|
||||||
alcGetIntegerv(Device, ALC_STEREO_SOURCES, 1, &stereo);
|
alcGetIntegerv(Device, ALC_STEREO_SOURCES, 1, &stereo);
|
||||||
if(getALCError(Device) == AL_NO_ERROR)
|
if(getALCError(Device) == AL_NO_ERROR)
|
||||||
{
|
{
|
||||||
Printf("Device sample rate: "TEXTCOLOR_BLUE"%d"TEXTCOLOR_NORMAL"hz\n", frequency);
|
Printf("Device sample rate: " TEXTCOLOR_BLUE"%d" TEXTCOLOR_NORMAL"hz\n", frequency);
|
||||||
Printf("ALC Version: "TEXTCOLOR_BLUE"%d.%d\n", major, minor);
|
Printf("ALC Version: " TEXTCOLOR_BLUE"%d.%d\n", major, minor);
|
||||||
Printf("ALC Extensions: "TEXTCOLOR_ORANGE"%s\n", alcGetString(Device, ALC_EXTENSIONS));
|
Printf("ALC Extensions: " TEXTCOLOR_ORANGE"%s\n", alcGetString(Device, ALC_EXTENSIONS));
|
||||||
Printf("Available sources: "TEXTCOLOR_BLUE"%d"TEXTCOLOR_NORMAL" ("TEXTCOLOR_BLUE"%d"TEXTCOLOR_NORMAL" mono, "TEXTCOLOR_BLUE"%d"TEXTCOLOR_NORMAL" stereo)\n", mono+stereo, mono, stereo);
|
Printf("Available sources: " TEXTCOLOR_BLUE"%d" TEXTCOLOR_NORMAL" (" TEXTCOLOR_BLUE"%d" TEXTCOLOR_NORMAL" mono, " TEXTCOLOR_BLUE"%d" TEXTCOLOR_NORMAL" stereo)\n", mono+stereo, mono, stereo);
|
||||||
}
|
}
|
||||||
if(!alcIsExtensionPresent(Device, "ALC_EXT_EFX"))
|
if(!alcIsExtensionPresent(Device, "ALC_EXT_EFX"))
|
||||||
Printf("EFX not found\n");
|
Printf("EFX not found\n");
|
||||||
|
@ -1761,14 +1761,14 @@ void OpenALSoundRenderer::PrintStatus()
|
||||||
alcGetIntegerv(Device, ALC_MAX_AUXILIARY_SENDS, 1, &sends);
|
alcGetIntegerv(Device, ALC_MAX_AUXILIARY_SENDS, 1, &sends);
|
||||||
if(getALCError(Device) == AL_NO_ERROR)
|
if(getALCError(Device) == AL_NO_ERROR)
|
||||||
{
|
{
|
||||||
Printf("EFX Version: "TEXTCOLOR_BLUE"%d.%d\n", major, minor);
|
Printf("EFX Version: " TEXTCOLOR_BLUE"%d.%d\n", major, minor);
|
||||||
Printf("Auxiliary sends: "TEXTCOLOR_BLUE"%d\n", sends);
|
Printf("Auxiliary sends: " TEXTCOLOR_BLUE"%d\n", sends);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Printf("Vendor: "TEXTCOLOR_ORANGE"%s\n", alGetString(AL_VENDOR));
|
Printf("Vendor: " TEXTCOLOR_ORANGE"%s\n", alGetString(AL_VENDOR));
|
||||||
Printf("Renderer: "TEXTCOLOR_ORANGE"%s\n", alGetString(AL_RENDERER));
|
Printf("Renderer: " TEXTCOLOR_ORANGE"%s\n", alGetString(AL_RENDERER));
|
||||||
Printf("Version: "TEXTCOLOR_ORANGE"%s\n", alGetString(AL_VERSION));
|
Printf("Version: " TEXTCOLOR_ORANGE"%s\n", alGetString(AL_VERSION));
|
||||||
Printf("Extensions: "TEXTCOLOR_ORANGE"%s\n", alGetString(AL_EXTENSIONS));
|
Printf("Extensions: " TEXTCOLOR_ORANGE"%s\n", alGetString(AL_EXTENSIONS));
|
||||||
getALError();
|
getALError();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1783,7 +1783,7 @@ FString OpenALSoundRenderer::GatherStats()
|
||||||
uint32 unused = FreeSfx.Size();
|
uint32 unused = FreeSfx.Size();
|
||||||
|
|
||||||
FString out;
|
FString out;
|
||||||
out.Format("%u sources ("TEXTCOLOR_YELLOW"%u"TEXTCOLOR_NORMAL" active, "TEXTCOLOR_YELLOW"%u"TEXTCOLOR_NORMAL" free), Update interval: "TEXTCOLOR_YELLOW"%d"TEXTCOLOR_NORMAL"ms",
|
out.Format("%u sources (" TEXTCOLOR_YELLOW"%u" TEXTCOLOR_NORMAL" active, " TEXTCOLOR_YELLOW"%u" TEXTCOLOR_NORMAL" free), Update interval: " TEXTCOLOR_YELLOW"%d" TEXTCOLOR_NORMAL"ms",
|
||||||
total, used, unused, 1000/updates);
|
total, used, unused, 1000/updates);
|
||||||
return out;
|
return out;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue