WLog_ERR(TAG, "%s: %i - %s\n", _text, _error, strerror(_error));
-static int audin_oss_get_format(const AUDIO_FORMAT* format)
+static UINT32 audin_oss_get_format(const AUDIO_FORMAT* format)
{
switch (format->wFormatTag)
{
char mixer_name[PATH_MAX] = "/dev/mixer";
int pcm_handle = -1, mixer_handle;
BYTE* buffer = NULL;
- int tmp;
+ unsigned long tmp;
size_t buffer_size;
AudinOSSDevice* oss = (AudinOSSDevice*)arg;
UINT error = 0;
while (1)
{
+ SSIZE_T stmp;
status = WaitForSingleObject(oss->stopEvent, 0);
if (status == WAIT_FAILED)
if (status == WAIT_OBJECT_0)
break;
- tmp = read(pcm_handle, buffer, buffer_size);
+ stmp = read(pcm_handle, buffer, buffer_size);
/* Error happen. */
- if (tmp < 0)
+ if (stmp < 0)
{
OSS_LOG_ERR("read() error", errno);
continue;
}
- if (tmp < buffer_size) /* Not enouth data. */
+ if ((size_t)stmp < buffer_size) /* Not enouth data. */
continue;
if ((error = oss->receive(&oss->format, buffer, buffer_size, oss->user_data)))
static UINT audin_oss_free(IAudinDevice* device)
{
AudinOSSDevice* oss = (AudinOSSDevice*)device;
- int error;
+ UINT error;
if (device == NULL)
return ERROR_INVALID_PARAMETER;
return CHANNEL_RC_NULL_DATA;
}
- oss->dev_unit = val;
+ oss->dev_unit = (INT32)val;
}
if (oss->dev_unit < 0 || *eptr != '\0')