Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

creates a write handle without failing

  • Loading branch information...
commit b6667392e1062149900df1d4f5b09279abd9805a 1 parent ec45692
@substack authored
Showing with 18 additions and 2 deletions.
  1. +18 −2 sox.cc
View
20 sox.cc
@@ -7,8 +7,24 @@ using namespace v8;
Handle<Value> hello(const Arguments& args) {
HandleScope scope;
- sox_format_t *sfh = sox_open_read("test.wav", NULL, NULL, NULL);
- //sox_write(sfh, set_default_device);
+ sox_format_t *rh = sox_open_read("test.wav", NULL, NULL, NULL);
+ sox_signalinfo_t signal;
+ signal.rate = 48000;
+ signal.channels = 2;
+ signal.precision = 16;
+ signal.length = 0;
+ signal.mult = NULL;
+
+ sox_encodinginfo_t ei;
+ ei.encoding = SOX_ENCODING_SIGN2;
+ ei.bits_per_sample = 0;
+ ei.compression = 0;
+ ei.reverse_bytes = SOX_OPTION_DEFAULT;
+ ei.reverse_nibbles = SOX_OPTION_DEFAULT;
+ ei.reverse_bits = SOX_OPTION_DEFAULT;
+ ei.opposite_endian = sox_false;
+
+ sox_format_t *wh = sox_open_write("alsa", &signal, &ei, "wav", NULL, false);
return scope.Close(String::New("world"));
}
Please sign in to comment.
Something went wrong with that request. Please try again.