allow building Furnace without SDL2 and libsndfile
for eventual libfurnace
This commit is contained in:
parent
16afb6d7be
commit
e17c99dcdf
4 changed files with 121 additions and 61 deletions
|
|
@ -21,7 +21,9 @@
|
|||
#include "../ta-log.h"
|
||||
#include <math.h>
|
||||
#include <string.h>
|
||||
#ifdef HAVE_SNDFILE
|
||||
#include <sndfile.h>
|
||||
#endif
|
||||
#include "filter.h"
|
||||
|
||||
extern "C" {
|
||||
|
|
@ -37,6 +39,10 @@ DivSampleHistory::~DivSampleHistory() {
|
|||
}
|
||||
|
||||
bool DivSample::save(const char* path) {
|
||||
#ifndef HAVE_SNDFILE
|
||||
logE("Furnace was not compiled with libsndfile!");
|
||||
return false;
|
||||
#else
|
||||
SNDFILE* f;
|
||||
SF_INFO si;
|
||||
memset(&si,0,sizeof(SF_INFO));
|
||||
|
|
@ -76,6 +82,7 @@ bool DivSample::save(const char* path) {
|
|||
sf_close(f);
|
||||
|
||||
return true;
|
||||
#endif
|
||||
}
|
||||
|
||||
// 16-bit memory is padded to 512, to make things easier for ADPCM-A/B.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue