shithub: libsamplerate

Download patch

ref: 0d8a13492defe99e5b25f3e4f19986fffc4e267c
parent: c901a46c7e2aee5ebc9916c42c063af79a1814a4
author: Erik de Castro Lopo <erikd@mega-nerd.com>
date: Mon Aug 27 15:25:05 EDT 2012

Add SRC_ERR_BAD_INTERNAL_STATE error number and string.

--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2012-08-27  Erik de Castro Lopo  <erikd AT mega-nerd DOT com>
+
+    * src/common.h src/samplerate.c
+    Add SRC_ERR_BAD_INTERNAL_STATE error number and string.
+
 2012-08-23  Erik de Castro Lopo  <erikd AT mega-nerd DOT com>
 
     * tests/multi_channel_test.c tests/snr_bw_test.c tests/varispeed_test.c
--- a/src/common.h
+++ b/src/common.h
@@ -1,5 +1,5 @@
 /*
-** Copyright (C) 2002-2011 Erik de Castro Lopo <erikd@mega-nerd.com>
+** Copyright (C) 2002-2012 Erik de Castro Lopo <erikd@mega-nerd.com>
 **
 ** This program is free software; you can redistribute it and/or modify
 ** it under the terms of the GNU General Public License as published by
@@ -99,6 +99,7 @@
 	SRC_ERR_NULL_CALLBACK,
 	SRC_ERR_NO_VARIABLE_RATIO,
 	SRC_ERR_SINC_PREPARE_DATA_BAD_LEN,
+	SRC_ERR_BAD_INTERNAL_STATE,
 
 	/* This must be the last error number. */
 	SRC_ERR_MAX_ERROR
--- a/src/samplerate.c
+++ b/src/samplerate.c
@@ -426,6 +426,8 @@
 				return "This converter only allows constant conversion ratios." ;
 		case SRC_ERR_SINC_PREPARE_DATA_BAD_LEN :
 				return "Internal error : Bad length in prepare_data ()." ;
+		case SRC_ERR_BAD_INTERNAL_STATE :
+				return "Error : Someone is trampling on my internal state." ;
 
 		case SRC_ERR_MAX_ERROR :
 				return "Placeholder. No error defined for this error number." ;