Fixed formats supported by backend.
@@ -85,8 +85,10 @@ static BOOL rdpsnd_mac_set_format(rdpsndDevicePlugin* device, const AUDIO_FORMAT
mac->audioFormat.mFramesPerPacket = 1;
mac->audioFormat.mChannelsPerFrame = format->nChannels;
mac->audioFormat.mBitsPerChannel = format->wBitsPerSample;
- mac->audioFormat.mBytesPerFrame = mac->audioFormat.mBitsPerChannel * mac->audioFormat.mChannelsPerFrame / 8;
- mac->audioFormat.mBytesPerPacket = mac->audioFormat.mBytesPerFrame * mac->audioFormat.mFramesPerPacket;
+ mac->audioFormat.mBytesPerFrame = mac->audioFormat.mBitsPerChannel *
+ mac->audioFormat.mChannelsPerFrame / 8;
+ mac->audioFormat.mBytesPerPacket = mac->audioFormat.mBytesPerFrame *
+ mac->audioFormat.mFramesPerPacket;
mac->audioFormat.mReserved = 0;
switch (format->wFormatTag)
@@ -113,7 +115,8 @@ static BOOL rdpsnd_mac_set_format(rdpsndDevicePlugin* device, const AUDIO_FORMAT
static char* FormatError(OSStatus st)
{
- switch (st) {
+ switch (st)
+ {
case kAudioFileUnspecifiedError:
return "kAudioFileUnspecifiedError";
@@ -184,6 +187,7 @@ static BOOL rdpsnd_mac_open(rdpsndDevicePlugin* device, const AUDIO_FORMAT* form
status = AudioQueueNewOutput(&(mac->audioFormat),
mac_audio_queue_output_cb, mac,
NULL, NULL, 0, &(mac->audioQueue));
+
if (status != 0)
{
const char* err = FormatError(status);
@@ -255,14 +259,11 @@ static BOOL rdpsnd_mac_format_supported(rdpsndDevicePlugin* device, const AUDIO_
case WAVE_FORMAT_PCM:
case WAVE_FORMAT_ALAW:
case WAVE_FORMAT_MULAW:
- case WAVE_FORMAT_GSM610:
return TRUE;
default:
return FALSE;
}
-
- return FALSE;
}
static BOOL rdpsnd_mac_set_volume(rdpsndDevicePlugin* device, UINT32 value)
