Commit 68fafc99 authored by André Anjos's avatar André Anjos 💬
Browse files

[cpp] Fixes to sox compatibility

parent 8ae1e14a
...@@ -69,7 +69,11 @@ bob::io::audio::Writer::Writer(const char* filename, double rate, ...@@ -69,7 +69,11 @@ bob::io::audio::Writer::Writer(const char* filename, double rate,
siginfo.rate = rate; siginfo.rate = rate;
siginfo.precision = bits_per_sample; siginfo.precision = bits_per_sample;
siginfo.channels = SOX_UNSPEC; siginfo.channels = SOX_UNSPEC;
#ifdef SOX_UNKNOWN_LEN
siginfo.length = SOX_UNKNOWN_LEN; siginfo.length = SOX_UNKNOWN_LEN;
#else
siginfo.length = -1;
#endif
const char* extension = lsx_find_file_extension(filename); const char* extension = lsx_find_file_extension(filename);
......
...@@ -6,12 +6,13 @@ ...@@ -6,12 +6,13 @@
*/ */
#define BOB_IMPORT_VERSION #define BOB_IMPORT_VERSION
#include <cstring>
#include <bob.blitz/config.h> #include <bob.blitz/config.h>
#include <bob.blitz/cleanup.h> #include <bob.blitz/cleanup.h>
#include <bob.core/config.h> #include <bob.core/config.h>
#include <bob.io.base/config.h> #include <bob.io.base/config.h>
#include <cstring>
extern "C" { extern "C" {
#include <sox.h> #include <sox.h>
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment