Ejemplo n.º 1
0
static void rdpsnd_winmm_set_format(rdpsndDevicePlugin* device, AUDIO_FORMAT* format, int latency)
{
	rdpsndWinmmPlugin* winmm = (rdpsndWinmmPlugin*) device;

	if (format)
	{
		rdpsnd_winmm_convert_format(format, &winmm->format);

		winmm->wformat = format->wFormatTag;
		winmm->block_size = format->nBlockAlign;
	}
}
Ejemplo n.º 2
0
static BOOL rdpsnd_winmm_set_format(rdpsndDevicePlugin* device, AUDIO_FORMAT* format, int latency)
{
	rdpsndWinmmPlugin* winmm = (rdpsndWinmmPlugin*) device;

	if (format)
	{
		if (!rdpsnd_winmm_convert_format(format, &winmm->format))
			return FALSE;

		winmm->wformat = format->wFormatTag;
		winmm->block_size = format->nBlockAlign;
	}
	return TRUE;
}
Ejemplo n.º 3
0
static BOOL rdpsnd_winmm_format_supported(rdpsndDevicePlugin* device, AUDIO_FORMAT* format)
{
	MMRESULT result;
	WAVEFORMATEX out;

	if (rdpsnd_winmm_convert_format(format, &out))
	{
		result = waveOutOpen(NULL, WAVE_MAPPER, &out, 0, 0, WAVE_FORMAT_QUERY);

		if (result == MMSYSERR_NOERROR)
			return TRUE;
	}

	return FALSE;
}