Commit dfea6b7c authored by Max Kellermann's avatar Max Kellermann

mvp: fixed default device detection

The check "open()!=0" is wrong, you have to write "open()>=0", because -1 means error, and 0 is a valid file handle.
parent ec926539
...@@ -20,6 +20,7 @@ ver 0.15 - (200?/??/??) ...@@ -20,6 +20,7 @@ ver 0.15 - (200?/??/??)
- mvp: fall back to stereo - mvp: fall back to stereo
- mvp: fall back to 16 bit audio samples - mvp: fall back to 16 bit audio samples
- mvp: check for reopen errors - mvp: check for reopen errors
- mvp: fixed default device detection
* commands: * commands:
- "playlistinfo" supports a range now - "playlistinfo" supports a range now
- added "sticker database", command "sticker", which allows clients - added "sticker database", command "sticker", which allows clients
......
...@@ -114,7 +114,7 @@ mvp_output_test_default_device(void) ...@@ -114,7 +114,7 @@ mvp_output_test_default_device(void)
fd = open("/dev/adec_pcm", O_WRONLY); fd = open("/dev/adec_pcm", O_WRONLY);
if (fd) { if (fd >= 0) {
close(fd); close(fd);
return true; return true;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment