"use default instead", psz_waveout_dev );
}
}
- if(psz_waveout_dev) free( psz_waveout_dev );
+ free( psz_waveout_dev );
WAVEOUTCAPS waveoutcaps;
MMRESULT result;
/* Prepare the buffer */
- if( p_buffer != NULL )
+ if( p_buffer != NULL )
{
p_waveheader->lpData = p_buffer->p_buffer;
/*
copy the buffer to the silence buffer :) so in case we don't
get the next buffer fast enough (I will repeat this one a time
- for AC3 / DTS and SPDIF this will sound better instead of
+ for AC3 / DTS and SPDIF this will sound better instead of
a hickup)
*/
if(b_spdif)
if(waveOutGetDevCaps(i, &caps, sizeof(WAVEOUTCAPS))
== MMSYSERR_NOERROR)
{
- sprintf(sz_dev_name,psz_device_name_fmt,caps.szPname,
+ sprintf( sz_dev_name, psz_device_name_fmt, caps.szPname,
caps.wMid,
caps.wPid
);
- p_item->ppsz_list[j] = strdup( sz_dev_name );
+ p_item->ppsz_list[j] = FromLocaleDup( sz_dev_name );
p_item->ppsz_list_text[j] = FromLocaleDup( sz_dev_name );
p_item->i_list++;
j++;
/*
convert devicename to device ID for output
if device not found return WAVE_MAPPER, so let
- windows decide which prefered audio device
+ windows decide which preferred audio device
should be used.
*/
static uint32_t findDeviceID(char *psz_device_name)
if(waveOutGetDevCaps(i, &caps, sizeof(WAVEOUTCAPS))
== MMSYSERR_NOERROR)
{
- sprintf(sz_dev_name,psz_device_name_fmt,caps.szPname,
+ sprintf(sz_dev_name, psz_device_name_fmt, caps.szPname,
caps.wMid,
caps.wPid
);
- if(!stricmp(sz_dev_name,psz_device_name))
- return i;
+ char *psz_temp = FromLocaleDup(sz_dev_name);
+
+ if( !stricmp(psz_temp, psz_device_name) )
+ {
+ LocaleFree( psz_temp );
+ return i;
+ }
+ LocaleFree( psz_temp );
}
}