summaryrefslogtreecommitdiffstats
path: root/sesman/chansrv/sound.c
diff options
context:
space:
mode:
authorKoichiro IWAO <meta@vmeta.jp>2017-07-24 13:42:42 +0900
committermetalefty <meta@vmeta.jp>2017-07-25 11:40:04 +0900
commitca24572fd5aa451cd618202be9daa232adaf2814 (patch)
tree88a51e4cd158c6325d2155cf556692e62f469bb4 /sesman/chansrv/sound.c
parentdbaf23e93b3ab96c9201d6387146efd8d65c8f4d (diff)
downloadxrdp-proprietary-ca24572fd5aa451cd618202be9daa232adaf2814.tar.gz
xrdp-proprietary-ca24572fd5aa451cd618202be9daa232adaf2814.zip
chansrv: use switch-case to support more codecs
Diffstat (limited to 'sesman/chansrv/sound.c')
-rw-r--r--sesman/chansrv/sound.c25
1 files changed, 13 insertions, 12 deletions
diff --git a/sesman/chansrv/sound.c b/sesman/chansrv/sound.c
index f049da14..73c30d95 100644
--- a/sesman/chansrv/sound.c
+++ b/sesman/chansrv/sound.c
@@ -367,19 +367,20 @@ sound_process_output_format(int aindex, int wFormatTag, int nChannels,
}
#endif
- if (wFormatTag == WAVE_FORMAT_OPUS)
+ switch(wFormatTag)
{
- LOG(0, ("wFormatTag, opus"));
- g_client_does_opus = 1;
- g_client_opus_index = aindex;
- g_bbuf_size = 11520;
- }
- else if (wFormatTag == WAVE_FORMAT_MPEGLAYER3)
- {
- LOG(0, ("wFormatTag, mp3"));
- g_client_does_mp3lame = 1;
- g_client_mp3lame_index = aindex;
- g_bbuf_size = 11520;
+ case WAVE_FORMAT_MPEGLAYER3:
+ LOG(0, ("wFormatTag, mp3"));
+ g_client_does_mp3lame = 1;
+ g_client_mp3lame_index = aindex;
+ g_bbuf_size = 11520;
+ break;
+ case WAVE_FORMAT_OPUS:
+ LOG(0, ("wFormatTag, opus"));
+ g_client_does_opus = 1;
+ g_client_opus_index = aindex;
+ g_bbuf_size = 11520;
+ break;
}
return 0;