smpl_buf: Fix str_code() param and print unknown error val
Change-Id: I95fadac15b9ad337ebc7cfb44a20dcf803ff8a47
This commit is contained in:
parent
dccc82491c
commit
1421adbc61
|
@ -154,7 +154,7 @@ std::string smpl_buf::str_status(TIMESTAMP timestamp) const
|
|||
return ost.str();
|
||||
}
|
||||
|
||||
std::string smpl_buf::str_code(ssize_t code)
|
||||
std::string smpl_buf::str_code(int code)
|
||||
{
|
||||
switch (code) {
|
||||
case ERROR_TIMESTAMP:
|
||||
|
@ -166,6 +166,8 @@ std::string smpl_buf::str_code(ssize_t code)
|
|||
case ERROR_OVERFLOW:
|
||||
return "Sample buffer: Overrun";
|
||||
default:
|
||||
return "Sample buffer: Unknown error";
|
||||
std::stringstream ss;
|
||||
ss << "Sample buffer: Unknown error " << code;
|
||||
return ss.str();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -68,7 +68,7 @@ public:
|
|||
@param code an error code
|
||||
@return a formatted error string
|
||||
*/
|
||||
static std::string str_code(ssize_t code);
|
||||
static std::string str_code(int code);
|
||||
|
||||
enum err_code {
|
||||
ERROR_TIMESTAMP = -1,
|
||||
|
|
Loading…
Reference in New Issue