Forum: Ruby Generating files with libsndfile

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
2ec38e324983babdd5c926c56f9e0c80?d=identicon&s=25 Alex Polite (Guest)
on 2006-05-31 19:56
(Received via mailing list)
I'm trying to generate sound files with the ruby wrapper around
libsndfile.[1]

I have no problem reading sound files as there are examples for this
in the documentation. But writing is another matter.


This script
================================
require 'audio'
require 'audio/sndfile'
sf = Audio::Soundfile.new("/tmp/anewfile.wav")
silence = Audio::Sound.float(100)
sf.write_float(silence)
================================

Will generate this error when run:

System error.
(eval):2:in `write_float': Format check failed: 0 (RuntimeError)



[1] http://hans.fugal.net/src/ruby-audio/doc/
This topic is locked and can not be replied to.