Use the UNUSED macro in the backends
This commit is contained in:
parent
1518895e15
commit
32e85d469b
@ -128,7 +128,7 @@ static ALCboolean DSoundLoad(void)
|
||||
}
|
||||
|
||||
|
||||
static BOOL CALLBACK DSoundEnumPlaybackDevices(LPGUID guid, LPCSTR desc, LPCSTR drvname, LPVOID data)
|
||||
static BOOL CALLBACK DSoundEnumPlaybackDevices(LPGUID guid, LPCSTR desc, LPCSTR UNUSED(drvname), LPVOID UNUSED(data))
|
||||
{
|
||||
LPOLESTR guidstr = NULL;
|
||||
char str[1024];
|
||||
@ -137,9 +137,6 @@ static BOOL CALLBACK DSoundEnumPlaybackDevices(LPGUID guid, LPCSTR desc, LPCSTR
|
||||
int count;
|
||||
ALuint i;
|
||||
|
||||
(void)data;
|
||||
(void)drvname;
|
||||
|
||||
if(!guid)
|
||||
return TRUE;
|
||||
|
||||
@ -178,7 +175,7 @@ static BOOL CALLBACK DSoundEnumPlaybackDevices(LPGUID guid, LPCSTR desc, LPCSTR
|
||||
}
|
||||
|
||||
|
||||
static BOOL CALLBACK DSoundEnumCaptureDevices(LPGUID guid, LPCSTR desc, LPCSTR drvname, LPVOID data)
|
||||
static BOOL CALLBACK DSoundEnumCaptureDevices(LPGUID guid, LPCSTR desc, LPCSTR UNUSED(drvname), LPVOID UNUSED(data))
|
||||
{
|
||||
LPOLESTR guidstr = NULL;
|
||||
char str[1024];
|
||||
@ -187,9 +184,6 @@ static BOOL CALLBACK DSoundEnumCaptureDevices(LPGUID guid, LPCSTR desc, LPCSTR d
|
||||
int count;
|
||||
ALuint i;
|
||||
|
||||
(void)data;
|
||||
(void)drvname;
|
||||
|
||||
if(!guid)
|
||||
return TRUE;
|
||||
|
||||
|
@ -32,9 +32,8 @@ static ALCenum loopback_open_playback(ALCdevice *device, const ALCchar *deviceNa
|
||||
return ALC_NO_ERROR;
|
||||
}
|
||||
|
||||
static void loopback_close_playback(ALCdevice *device)
|
||||
static void loopback_close_playback(ALCdevice *UNUSED(device))
|
||||
{
|
||||
(void)device;
|
||||
}
|
||||
|
||||
static ALCboolean loopback_reset_playback(ALCdevice *device)
|
||||
@ -43,15 +42,13 @@ static ALCboolean loopback_reset_playback(ALCdevice *device)
|
||||
return ALC_TRUE;
|
||||
}
|
||||
|
||||
static ALCboolean loopback_start_playback(ALCdevice *device)
|
||||
static ALCboolean loopback_start_playback(ALCdevice *UNUSED(device))
|
||||
{
|
||||
return ALC_TRUE;
|
||||
(void)device;
|
||||
}
|
||||
|
||||
static void loopback_stop_playback(ALCdevice *device)
|
||||
static void loopback_stop_playback(ALCdevice *UNUSED(device))
|
||||
{
|
||||
(void)device;
|
||||
}
|
||||
|
||||
|
||||
@ -82,7 +79,6 @@ void alc_loopback_deinit(void)
|
||||
{
|
||||
}
|
||||
|
||||
void alc_loopback_probe(enum DevProbe type)
|
||||
void alc_loopback_probe(enum DevProbe UNUSED(type))
|
||||
{
|
||||
(void)type;
|
||||
}
|
||||
|
@ -127,31 +127,23 @@ typedef struct {
|
||||
} pa_data;
|
||||
|
||||
|
||||
static int pa_callback(const void *inputBuffer, void *outputBuffer,
|
||||
unsigned long framesPerBuffer, const PaStreamCallbackTimeInfo *timeInfo,
|
||||
const PaStreamCallbackFlags statusFlags, void *userData)
|
||||
static int pa_callback(const void *UNUSED(inputBuffer), void *outputBuffer,
|
||||
unsigned long framesPerBuffer, const PaStreamCallbackTimeInfo *UNUSED(timeInfo),
|
||||
const PaStreamCallbackFlags UNUSED(statusFlags), void *userData)
|
||||
{
|
||||
ALCdevice *device = (ALCdevice*)userData;
|
||||
|
||||
(void)inputBuffer;
|
||||
(void)timeInfo;
|
||||
(void)statusFlags;
|
||||
|
||||
aluMixData(device, outputBuffer, framesPerBuffer);
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int pa_capture_cb(const void *inputBuffer, void *outputBuffer,
|
||||
unsigned long framesPerBuffer, const PaStreamCallbackTimeInfo *timeInfo,
|
||||
const PaStreamCallbackFlags statusFlags, void *userData)
|
||||
static int pa_capture_cb(const void *inputBuffer, void *UNUSED(outputBuffer),
|
||||
unsigned long framesPerBuffer, const PaStreamCallbackTimeInfo *UNUSED(timeInfo),
|
||||
const PaStreamCallbackFlags UNUSED(statusFlags), void *userData)
|
||||
{
|
||||
ALCdevice *device = (ALCdevice*)userData;
|
||||
pa_data *data = (pa_data*)device->ExtraData;
|
||||
|
||||
(void)outputBuffer;
|
||||
(void)timeInfo;
|
||||
(void)statusFlags;
|
||||
|
||||
WriteRingBuffer(data->ring, inputBuffer, framesPerBuffer);
|
||||
return 0;
|
||||
}
|
||||
|
@ -392,17 +392,15 @@ static void stream_state_callback2(pa_stream *stream, void *pdata)
|
||||
pa_threaded_mainloop_signal(data->loop, 0);
|
||||
}
|
||||
|
||||
static void stream_success_callback(pa_stream *stream, int success, void *pdata)
|
||||
static void stream_success_callback(pa_stream *UNUSED(stream), int UNUSED(success), void *pdata)
|
||||
{
|
||||
ALCdevice *Device = pdata;
|
||||
pulse_data *data = Device->ExtraData;
|
||||
(void)stream;
|
||||
(void)success;
|
||||
|
||||
pa_threaded_mainloop_signal(data->loop, 0);
|
||||
}
|
||||
|
||||
static void sink_info_callback(pa_context *context, const pa_sink_info *info, int eol, void *pdata)
|
||||
static void sink_info_callback(pa_context *UNUSED(context), const pa_sink_info *info, int eol, void *pdata)
|
||||
{
|
||||
ALCdevice *device = pdata;
|
||||
pulse_data *data = device->ExtraData;
|
||||
@ -425,7 +423,6 @@ static void sink_info_callback(pa_context *context, const pa_sink_info *info, in
|
||||
{ NULL, 0 }
|
||||
};
|
||||
int i;
|
||||
(void)context;
|
||||
|
||||
if(eol)
|
||||
{
|
||||
@ -455,14 +452,12 @@ static void sink_info_callback(pa_context *context, const pa_sink_info *info, in
|
||||
ERR("Failed to find format for channel map:\n %s\n", chanmap_str);
|
||||
}
|
||||
|
||||
static void sink_device_callback(pa_context *context, const pa_sink_info *info, int eol, void *pdata)
|
||||
static void sink_device_callback(pa_context *UNUSED(context), const pa_sink_info *info, int eol, void *pdata)
|
||||
{
|
||||
pa_threaded_mainloop *loop = pdata;
|
||||
void *temp;
|
||||
ALuint i;
|
||||
|
||||
(void)context;
|
||||
|
||||
if(eol)
|
||||
{
|
||||
pa_threaded_mainloop_signal(loop, 0);
|
||||
@ -487,14 +482,12 @@ static void sink_device_callback(pa_context *context, const pa_sink_info *info,
|
||||
}
|
||||
}
|
||||
|
||||
static void source_device_callback(pa_context *context, const pa_source_info *info, int eol, void *pdata)
|
||||
static void source_device_callback(pa_context *UNUSED(context), const pa_source_info *info, int eol, void *pdata)
|
||||
{
|
||||
pa_threaded_mainloop *loop = pdata;
|
||||
void *temp;
|
||||
ALuint i;
|
||||
|
||||
(void)context;
|
||||
|
||||
if(eol)
|
||||
{
|
||||
pa_threaded_mainloop_signal(loop, 0);
|
||||
@ -519,11 +512,10 @@ static void source_device_callback(pa_context *context, const pa_source_info *in
|
||||
}
|
||||
}
|
||||
|
||||
static void sink_name_callback(pa_context *context, const pa_sink_info *info, int eol, void *pdata)
|
||||
static void sink_name_callback(pa_context *UNUSED(context), const pa_sink_info *info, int eol, void *pdata)
|
||||
{
|
||||
ALCdevice *device = pdata;
|
||||
pulse_data *data = device->ExtraData;
|
||||
(void)context;
|
||||
|
||||
if(eol)
|
||||
{
|
||||
@ -535,11 +527,10 @@ static void sink_name_callback(pa_context *context, const pa_sink_info *info, in
|
||||
device->DeviceName = strdup(info->description);
|
||||
}
|
||||
|
||||
static void source_name_callback(pa_context *context, const pa_source_info *info, int eol, void *pdata)
|
||||
static void source_name_callback(pa_context *UNUSED(context), const pa_source_info *info, int eol, void *pdata)
|
||||
{
|
||||
ALCdevice *device = pdata;
|
||||
pulse_data *data = device->ExtraData;
|
||||
(void)context;
|
||||
|
||||
if(eol)
|
||||
{
|
||||
@ -556,10 +547,9 @@ static void stream_moved_callback(pa_stream *stream, void *pdata)
|
||||
{
|
||||
ALCdevice *device = pdata;
|
||||
pulse_data *data = device->ExtraData;
|
||||
(void)stream;
|
||||
|
||||
free(data->device_name);
|
||||
data->device_name = strdup(pa_stream_get_device_name(data->stream));
|
||||
data->device_name = strdup(pa_stream_get_device_name(stream));
|
||||
|
||||
TRACE("Stream moved to %s\n", data->device_name);
|
||||
}
|
||||
@ -1568,13 +1558,13 @@ void alc_pulse_probe(enum DevProbe type)
|
||||
|
||||
#warning "Unsupported API version, backend will be unavailable!"
|
||||
|
||||
ALCboolean alc_pulse_init(BackendFuncs *func_list)
|
||||
{ return ALC_FALSE; (void)func_list; }
|
||||
ALCboolean alc_pulse_init(BackendFuncs *UNUSED(func_list))
|
||||
{ return ALC_FALSE; }
|
||||
|
||||
void alc_pulse_deinit(void)
|
||||
{ }
|
||||
|
||||
void alc_pulse_probe(enum DevProbe type)
|
||||
{ (void)type; }
|
||||
void alc_pulse_probe(enum DevProbe UNUSED(type))
|
||||
{ }
|
||||
|
||||
#endif
|
||||
|
@ -146,14 +146,11 @@ static void ProbeCaptureDevices(void)
|
||||
Posts a message to 'PlaybackThreadProc' everytime a WaveOut Buffer is completed and
|
||||
returns to the application (for more data)
|
||||
*/
|
||||
static void CALLBACK WaveOutProc(HWAVEOUT device, UINT msg, DWORD_PTR instance, DWORD_PTR param1, DWORD_PTR param2)
|
||||
static void CALLBACK WaveOutProc(HWAVEOUT UNUSED(device), UINT msg, DWORD_PTR instance, DWORD_PTR param1, DWORD_PTR UNUSED(param2))
|
||||
{
|
||||
ALCdevice *Device = (ALCdevice*)instance;
|
||||
WinMMData *data = Device->ExtraData;
|
||||
|
||||
(void)device;
|
||||
(void)param2;
|
||||
|
||||
if(msg != WOM_DONE)
|
||||
return;
|
||||
|
||||
@ -213,14 +210,11 @@ static DWORD WINAPI PlaybackThreadProc(LPVOID param)
|
||||
Posts a message to 'CaptureThreadProc' everytime a WaveIn Buffer is completed and
|
||||
returns to the application (with more data)
|
||||
*/
|
||||
static void CALLBACK WaveInProc(HWAVEIN device, UINT msg, DWORD_PTR instance, DWORD_PTR param1, DWORD_PTR param2)
|
||||
static void CALLBACK WaveInProc(HWAVEIN UNUSED(device), UINT msg, DWORD_PTR instance, DWORD_PTR param1, DWORD_PTR UNUSED(param2))
|
||||
{
|
||||
ALCdevice *Device = (ALCdevice*)instance;
|
||||
WinMMData *data = Device->ExtraData;
|
||||
|
||||
(void)device;
|
||||
(void)param2;
|
||||
|
||||
if(msg != WIM_DATA)
|
||||
return;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user