Skip to content

Commit

Permalink
Fixed extension array in sndfile_sink and changed read and write call…
Browse files Browse the repository at this point in the history
…s to use floats
  • Loading branch information
Hrick87 committed Dec 8, 2023
1 parent eddf0ff commit f512752
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,22 +14,27 @@ namespace sndio {
namespace{

const char* drivers[] = {
"wav",
"aiff",
"aifc",
"au",
"snd",
"au",
"avr",
"caf",
"htk",
"iff",
"mat",
"mpc",
"paf",
"pvf",
"snd",
"raw",
"rf64",
"sd2",
"sds",
"sf",
"voc",
"w64",
"mat",
"pvf",
"wav",
"wve",
"xi",
"htk",
"caf",
"sd2",
"flac"
};

const char * detect_file_extension(const char* path){
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,6 @@ namespace {
{"wav", SF_FORMAT_WAVEX},
{"wve", SF_FORMAT_WVE},
{"xi", SF_FORMAT_XI},
{"ogg", SF_FORMAT_OGG},
{"flac", SF_FORMAT_FLAC},
};

int map_to_sndfile(SF_INFO sfinfo, const char* driver, int &bits){
Expand Down Expand Up @@ -135,7 +133,7 @@ SndfileSink::SndfileSink(core::IArena& arena, const Config& config)

memset(&sf_info_out_, 0, sizeof(sf_info_out_));

sf_info_out_.format = SF_FORMAT_PCM_32;
sf_info_out_.format = SF_FORMAT_PCM_32; //change back to 32 after testing
sf_info_out_.channels = (int)config.sample_spec.num_channels();
sf_info_out_.samplerate = (int)config.sample_spec.sample_rate();

Expand Down

0 comments on commit f512752

Please sign in to comment.