aacdec: raise min buffer size to 1000 bytes.
[paraslash.git] / error.h
diff --git a/error.h b/error.h
index 478aec1..614390f 100644 (file)
--- a/error.h
+++ b/error.h
@@ -49,6 +49,7 @@ enum para_subsystem {
        SS_OGG,
        SS_MP3,
        SS_MP3DEC,
+       SS_AACDEC,
        SS_SERVER,
        SS_AFS,
        SS_MYSQL_SELECTOR,
@@ -58,6 +59,10 @@ enum para_subsystem {
        SS_DCCP_SEND,
        SS_FD,
        SS_GUI,
+       SS_WRITE,
+       SS_WRITE_COMMON,
+       SS_ALSA_WRITER,
+       SS_FILE_WRITER,
        SS_RINGBUFFER};
 
 #define NUM_SS (SS_RINGBUFFER + 1)
@@ -292,7 +297,51 @@ extern const char **para_errlist[];
 
 #define FD_ERRORS \
        PARA_ERROR(F_GETFL, "failed to get fd flags"), \
-       PARA_ERROR(F_SETFL, "failed to set fd flags")
+       PARA_ERROR(F_SETFL, "failed to set fd flags"), \
+
+
+#define WRITE_ERRORS \
+       PARA_ERROR(READ_HDR, "failed to read audio file header"), \
+       PARA_ERROR(READ_STDIN, "failed to read from stdin"), \
+       PARA_ERROR(WRITE_SYNTAX, "para_write syntax error"), \
+       PARA_ERROR(WRITE_OVERRUN, "buffer overrun"), \
+       PARA_ERROR(PREMATURE_END, "premature end of audio file"), \
+
+
+#define ALSA_WRITER_ERRORS \
+       PARA_ERROR(BROKEN_CONF, "Broken alsa configuration"), \
+       PARA_ERROR(ACCESS_TYPE, "alsa access type not available"), \
+       PARA_ERROR(SAMPLE_FORMAT, "sample format not available"), \
+       PARA_ERROR(CHANNEL_COUNT, "channels count not available"), \
+       PARA_ERROR(HW_PARAMS, "unable to install hw params"), \
+       PARA_ERROR(SW_PARAMS, "unable to install sw params"), \
+       PARA_ERROR(BAD_PERIOD, "can not use period equal to buffer size"), \
+       PARA_ERROR(GET_XFER, "unable to obtain xfer align"), \
+       PARA_ERROR(SET_XFER, "snd_pcm_sw_params_set_xfer_align() failed"), \
+       PARA_ERROR(ALSA_WRITE, "alsa write error"), \
+       PARA_ERROR(PCM_OPEN, "unable to open pcm"), \
+       PARA_ERROR(SND_PCM_INFO, "pcm info error"), \
+       PARA_ERROR(GET_BUFFER_TIME, "snd_pcm_hw_params_get_buffer_time_max() failed"), \
+       PARA_ERROR(SET_BUFFER_TIME, "snd_pcm_hw_params_set_buffer_time_near() failed"), \
+       PARA_ERROR(SET_RATE, "snd_pcm_hw_params_set_rate_near failed"), \
+       PARA_ERROR(START_THRESHOLD, "snd_pcm_sw_params_set_start_threshold() failed"), \
+       PARA_ERROR(STOP_THRESHOLD, "snd_pcm_sw_params_set_stop_threshold() failed"), \
+       PARA_ERROR(ALSA_LOG, "snd_output_stdio_attach() failed"), \
+
+
+#define FILE_WRITER_ERRORS \
+       PARA_ERROR(FW_WRITE, "file writer write error"), \
+       PARA_ERROR(FW_OPEN, "file writer: can not open output file"), \
+
+#define WRITE_COMMON_ERRORS \
+       PARA_ERROR(WRITE_COMMON_SYNTAX, "syntax error in write option"), \
+
+#define AACDEC_ERRORS \
+       PARA_ERROR(AACDEC_INIT, "failed to init aac decoder"), \
+       PARA_ERROR(ESDS, "did not find esds atom"), \
+       PARA_ERROR(STSZ, "did not find stsz atom"), \
+       PARA_ERROR(STCO, "did not find stco atom"), \
+       PARA_ERROR(AAC_DECODE, "aac decode error"), \
 
 /* these do not need error handling (yet) */
 #define SERVER_ERRORS
@@ -395,6 +444,7 @@ SS_ENUM(WAV);
 SS_ENUM(COMPRESS);
 SS_ENUM(OGGDEC);
 SS_ENUM(MP3DEC);
+SS_ENUM(AACDEC);
 SS_ENUM(FILTER);
 SS_ENUM(MP3);
 SS_ENUM(OGG);
@@ -414,6 +464,10 @@ SS_ENUM(DCCP_RECV);
 SS_ENUM(DCCP_SEND);
 SS_ENUM(FD);
 SS_ENUM(GUI);
+SS_ENUM(WRITE);
+SS_ENUM(WRITE_COMMON);
+SS_ENUM(ALSA_WRITER);
+SS_ENUM(FILE_WRITER);
 SS_ENUM(RINGBUFFER);
 /** \endcond */
 #undef PARA_ERROR