case AUDIO_FORMAT_S16:
if (endianness) {
return SND_PCM_FORMAT_S16_BE;
- }
- else {
+ } else {
return SND_PCM_FORMAT_S16_LE;
}
case AUDIO_FORMAT_U16:
if (endianness) {
return SND_PCM_FORMAT_U16_BE;
- }
- else {
+ } else {
return SND_PCM_FORMAT_U16_LE;
}
case AUDIO_FORMAT_S32:
if (endianness) {
return SND_PCM_FORMAT_S32_BE;
- }
- else {
+ } else {
return SND_PCM_FORMAT_S32_LE;
}
case AUDIO_FORMAT_U32:
if (endianness) {
return SND_PCM_FORMAT_U32_BE;
- }
- else {
+ } else {
return SND_PCM_FORMAT_U32_LE;
}
alsa_logerr (err, "Could not stop %s\n", typ);
return -1;
}
- }
- else {
+ } else {
err = snd_pcm_prepare (handle);
if (err < 0) {
alsa_logerr (err, "Could not prepare handle for %s\n", typ);
if (info->is_signed || info->is_float) {
memset(buf, 0x00, len * info->bytes_per_frame);
- }
- else {
+ } else {
switch (info->bits) {
case 8:
memset(buf, 0x80, len * info->bytes_per_frame);
rpos = hw->conv_buf->pos - live;
if (rpos >= 0) {
return rpos;
- }
- else {
+ } else {
return hw->conv_buf->size + rpos;
}
}
HWVoiceOut *hwo = NULL;
while ((hwo = audio_pcm_hw_find_any_enabled_out(s, hwo))) {
- if (!hwo->poll_mode) return 1;
+ if (!hwo->poll_mode) {
+ return 1;
+ }
}
while ((hwi = audio_pcm_hw_find_any_enabled_in(s, hwi))) {
- if (!hwi->poll_mode) return 1;
+ if (!hwi->poll_mode) {
+ return 1;
+ }
}
return 0;
}
audio_reset_timer (s);
}
}
- }
- else {
+ } else {
if (hw->enabled) {
int nb_active = 0;
}
}
sw->total_hw_samples_acquired = hw->total_samples_captured;
- }
- else {
+ } else {
if (hw->enabled) {
int nb_active = 0;
audio_init_nb_voices_in(s, drv);
s->drv = drv;
return 0;
- }
- else {
+ } else {
if (msg) {
dolog("Could not init `%s' audio driver\n", drv->name);
}
if (cap) {
QLIST_INSERT_HEAD (&cap->cb_head, cb, entries);
return cap;
- }
- else {
+ } else {
HWVoiceOut *hw;
CaptureVoiceOut *cap;
#ifdef DAC
dolog ("Driver `%s' does not support " NAME "\n", drv->name);
#endif
- }
- else {
+ } else {
dolog ("Driver `%s' does not support %d " NAME " voices, max %d\n",
drv->name,
glue (s->nb_hw_voices_, TYPE),
if (pdo->fixed_settings) {
hw_as = audiodev_to_audsettings(pdo);
- }
- else {
+ } else {
hw_as = *as;
}
if (glue (audio_pcm_sw_init_, TYPE) (sw, hw, name, as)) {
goto fail;
}
- }
- else {
+ } else {
sw = glue(audio_pcm_create_voice_pair_, TYPE)(s, name, as);
if (!sw) {
dolog ("Failed to create voice `%s'\n", name);
if (cur_ts >= old_ts) {
delta = cur_ts - old_ts;
- }
- else {
+ } else {
delta = UINT64_MAX - old_ts + cur_ts;
}
} else if (frameRange.mMaximum < frames) {
core->audioDevicePropertyBufferFrameSize = (UInt32) frameRange.mMaximum;
dolog ("warning: Downsizing Buffer Frames to %f\n", frameRange.mMaximum);
- }
- else {
+ } else {
core->audioDevicePropertyBufferFrameSize = frames;
}
dsound_logerr (hr, "Could not stop playing buffer\n");
return;
}
- }
- else {
+ } else {
dolog ("warning: Voice is not playing\n");
}
}
dsound_logerr (hr, "Could not stop capturing\n");
return;
}
- }
- else {
+ } else {
dolog ("warning: Voice is not capturing\n");
}
}
);
if (FAILED (hr)) {
dsound_logerr (hr, "Could not create DirectSoundCapture instance\n");
- }
- else {
+ } else {
hr = IDirectSoundCapture_Initialize (s->dsound_capture, NULL);
if (FAILED (hr)) {
dsound_logerr (hr, "Could not initialize DirectSoundCapture\n");
case AUDIO_FORMAT_S16:
if (endianness) {
return AFMT_S16_BE;
- }
- else {
+ } else {
return AFMT_S16_LE;
}
case AUDIO_FORMAT_U16:
if (endianness) {
return AFMT_U16_BE;
- }
- else {
+ } else {
return AFMT_U16_LE;
}
int trig = 0;
if (ioctl (fd, SNDCTL_DSP_SETTRIGGER, &trig) < 0) {
oss_logerr (errno, "SNDCTL_DSP_SETTRIGGER 0 failed\n");
- }
- else {
+ } else {
trig = PCM_ENABLE_OUTPUT;
if (ioctl (fd, SNDCTL_DSP_SETTRIGGER, &trig) < 0) {
oss_logerr (
errno,
"SNDCTL_DSP_SETTRIGGER PCM_ENABLE_OUTPUT failed\n"
);
- }
- else {
+ } else {
oss->mmapped = 1;
}
}