aboutsummaryrefslogtreecommitdiffstats
path: root/src/pcm_utils.c
diff options
context:
space:
mode:
authorJ. Alexander Treuman <jat@spatialrift.net>2007-05-26 18:15:54 +0000
committerJ. Alexander Treuman <jat@spatialrift.net>2007-05-26 18:15:54 +0000
commitbba444524eca700970f69261bc470fb01a138222 (patch)
tree7d5e302586ed757a6eb3f71a27f84bba60383fd4 /src/pcm_utils.c
parentdba45a59928301da0faa4ec679eb1a3a81d5fba5 (diff)
downloadmpd-bba444524eca700970f69261bc470fb01a138222.tar.gz
mpd-bba444524eca700970f69261bc470fb01a138222.tar.xz
mpd-bba444524eca700970f69261bc470fb01a138222.zip
Changing all calls to ERROR() followed by exit(EXIT_FAILURE) with a single
call to FATAL(). git-svn-id: https://svn.musicpd.org/mpd/trunk@6276 09075e82-0dd4-0310-85a5-a0d7c8717e4f
Diffstat (limited to 'src/pcm_utils.c')
-rw-r--r--src/pcm_utils.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/src/pcm_utils.c b/src/pcm_utils.c
index ab84850d7..534095620 100644
--- a/src/pcm_utils.c
+++ b/src/pcm_utils.c
@@ -72,9 +72,8 @@ void pcm_volumeChange(char *buffer, int bufferSize, AudioFormat * format,
}
break;
default:
- ERROR("%i bits not supported by pcm_volumeChange!\n",
+ FATAL("%i bits not supported by pcm_volumeChange!\n",
format->bits);
- exit(EXIT_FAILURE);
}
}
@@ -129,8 +128,7 @@ static void pcm_add(char *buffer1, char *buffer2, size_t bufferSize1,
memcpy(buffer8_1, buffer8_2, bufferSize2);
break;
default:
- ERROR("%i bits not supported by pcm_add!\n", format->bits);
- exit(EXIT_FAILURE);
+ FATAL("%i bits not supported by pcm_add!\n", format->bits);
}
}
@@ -447,8 +445,7 @@ size_t pcm_sizeOfConvBuffer(AudioFormat * inFormat, size_t inSize,
case 16:
break;
default:
- ERROR("only 8 or 16 bits are supported for conversion!\n");
- exit(EXIT_FAILURE);
+ FATAL("only 8 or 16 bits are supported for conversion!\n");
}
if (inFormat->channels != outFormat->channels) {
@@ -460,9 +457,8 @@ size_t pcm_sizeOfConvBuffer(AudioFormat * inFormat, size_t inSize,
outSize >>= 1;
break;
default:
- ERROR("only 1 or 2 channels are supported "
+ FATAL("only 1 or 2 channels are supported "
"for conversion!\n");
- exit(EXIT_FAILURE);
}
}