Properly store the current device settings for full duplex operation.
git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/trunk/rdesktop@1432 423420c4-83ab-492f-b58f-81f9feb106b5
This commit is contained in:
parent
05836bf86c
commit
3c70034691
11
rdpsnd_sun.c
11
rdpsnd_sun.c
@ -307,23 +307,21 @@ sun_set_format(RD_WAVEFORMATEX * pwfx)
|
||||
sun_pause();
|
||||
|
||||
if (pwfx->wBitsPerSample == 8)
|
||||
{
|
||||
info.play.encoding = AUDIO_ENCODING_LINEAR8;
|
||||
}
|
||||
format = AUDIO_ENCODING_LINEAR8;
|
||||
else if (pwfx->wBitsPerSample == 16)
|
||||
{
|
||||
info.play.encoding = AUDIO_ENCODING_LINEAR;
|
||||
}
|
||||
format = AUDIO_ENCODING_LINEAR;
|
||||
|
||||
samplewidth = pwfx->wBitsPerSample / 8;
|
||||
|
||||
if (pwfx->nChannels == 1)
|
||||
{
|
||||
info.play.channels = 1;
|
||||
stereo = 0;
|
||||
}
|
||||
else if (pwfx->nChannels == 2)
|
||||
{
|
||||
info.play.channels = 2;
|
||||
stereo = 1;
|
||||
samplewidth *= 2;
|
||||
}
|
||||
|
||||
@ -331,6 +329,7 @@ sun_set_format(RD_WAVEFORMATEX * pwfx)
|
||||
|
||||
info.play.sample_rate = pwfx->nSamplesPerSec;
|
||||
info.play.precision = pwfx->wBitsPerSample;
|
||||
info.play.encoding = format;
|
||||
info.play.samples = 0;
|
||||
info.play.eof = 0;
|
||||
info.play.error = 0;
|
||||
|
Loading…
Reference in New Issue
Block a user