command.c: cast members of struct timeval to long unsigned
[paraslash.git] / error.h
diff --git a/error.h b/error.h
index 478aec1..d0c3afc 100644 (file)
--- a/error.h
+++ b/error.h
@@ -58,6 +58,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 +296,45 @@ 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"), \
+
 
 /* these do not need error handling (yet) */
 #define SERVER_ERRORS
@@ -414,6 +456,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