Sha256: 51a3e8e475a88ae155c8337aa93a9940b78f77643afdc74b8fb29d4cbae64ccd
Contents?: true
Size: 368 Bytes
Versions: 9
Compression:
Stored size: 368 Bytes
Contents
#!/usr/bin/env ruby require "coreaudio" wav = CoreAudio::AudioFile.new("sample.wav", :read) m4a = CoreAudio::AudioFile.new("sample.m4a", :write, :format => :m4a, :rate => wav.rate, :channels => wav.channels) loop do buf = wav.read(1024) break if buf.nil? m4a.write(buf) end wav.close m4a.close
Version data entries
9 entries across 9 versions & 1 rubygems