summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--audio_out.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/audio_out.c b/audio_out.c
index 861db0c..69394c8 100644
--- a/audio_out.c
+++ b/audio_out.c
@@ -65,7 +65,7 @@ int audio_out_pcm_open(struct tinyalsa_audio_stream_out *stream_out)
pcm = pcm_open(stream_out->mixer_props->card,
stream_out->mixer_props->device, PCM_OUT, &pcm_config);
- if(!pcm || !pcm_is_ready(pcm)) {
+ if(pcm == NULL || !pcm_is_ready(pcm)) {
LOGE("Unable to open pcm device: %s", pcm_get_error(pcm));
return -1;
}
@@ -311,7 +311,7 @@ static ssize_t audio_out_write(struct audio_stream_out *stream,
stream_out->standby = 0;
}
- if(stream_out->pcm == NULL || pcm_is_ready(stream_out->pcm)) {
+ if(stream_out->pcm == NULL || !pcm_is_ready(stream_out->pcm)) {
LOGE("pcm device is not ready");
return -1;
}