make it possible for the driver to switch resampling on and off
dynamically. this will be needed for the OSS driver. git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/trunk/rdesktop@1278 423420c4-83ab-492f-b58f-81f9feb106b5
This commit is contained in:
parent
8129a2d373
commit
e82b81576b
1
rdpsnd.h
1
rdpsnd.h
@ -37,6 +37,7 @@ struct audio_driver
|
||||
char *name;
|
||||
char *description;
|
||||
int need_byteswap_on_be;
|
||||
int need_resampling;
|
||||
struct audio_driver *next;
|
||||
};
|
||||
|
||||
|
@ -287,6 +287,7 @@ alsa_register(char *options)
|
||||
alsa_driver.name = xstrdup("alsa");
|
||||
alsa_driver.description = xstrdup("ALSA output driver, default device: " DEFAULTDEVICE);
|
||||
alsa_driver.need_byteswap_on_be = 0;
|
||||
alsa_driver.need_resampling = 0;
|
||||
alsa_driver.next = NULL;
|
||||
|
||||
if (options)
|
||||
|
@ -310,7 +310,7 @@ rdpsnd_dsp_process(STREAM s, struct audio_driver * current_driver, WAVEFORMATEX
|
||||
|
||||
out.data = NULL;
|
||||
|
||||
if (current_driver->wave_out_format_supported == rdpsnd_dsp_resample_supported)
|
||||
if (current_driver->need_resampling)
|
||||
out.size = rdpsnd_dsp_resample(&out.data, s->data, s->size, format, stream_be);
|
||||
|
||||
if (out.data == NULL)
|
||||
|
@ -195,6 +195,7 @@ libao_register(char *options)
|
||||
libao_driver.name = xstrdup("libao");
|
||||
libao_driver.description = description;
|
||||
libao_driver.need_byteswap_on_be = 0;
|
||||
libao_driver.need_resampling = 1;
|
||||
libao_driver.next = NULL;
|
||||
|
||||
ao_initialize();
|
||||
|
@ -250,6 +250,7 @@ oss_register(char *options)
|
||||
oss_driver.description =
|
||||
xstrdup("OSS output driver, default device: " DEFAULTDEVICE " or $AUDIODEV");
|
||||
oss_driver.need_byteswap_on_be = 0;
|
||||
oss_driver.need_resampling = 0;
|
||||
oss_driver.next = NULL;
|
||||
|
||||
if (options)
|
||||
|
@ -297,6 +297,7 @@ sgi_register(char *options)
|
||||
sgi_driver.name = xstrdup("sgi");
|
||||
sgi_driver.description = xstrdup("SGI output driver");
|
||||
sgi_driver.need_byteswap_on_be = 1;
|
||||
sgi_driver.need_resampling = 0;
|
||||
sgi_driver.next = NULL;
|
||||
|
||||
if (options)
|
||||
|
@ -264,6 +264,7 @@ sun_register(char *options)
|
||||
sun_driver.description =
|
||||
xstrdup("SUN/BSD output driver, default device: " DEFAULTDEVICE " or $AUDIODEV");
|
||||
sun_driver.need_byteswap_on_be = 1;
|
||||
sun_driver.need_resampling = 0;
|
||||
sun_driver.next = NULL;
|
||||
|
||||
if (options)
|
||||
|
Loading…
Reference in New Issue
Block a user