Recording Audio through RTMP/Rails

拟墨画扇 提交于 2019-12-03 20:38:28

I was able to get this to work

1) Flash Player 10.1 can get the microphone's ByteArray

2) I captured this ByteArray, used Adobe's WavWriter class (from a microphone tutorial they put together) to create a new ByteArray in proper wav format

3) Sent this over to rails through RubyAMF

4) Used something along the lines of

wav_data = rubyamf_params[0][:wav_data]

f = File.new('c:/hello.wav')
f << wav_data.pack('c'*wav_data.length)
f.close

Once I've got this wav data it won't be too far of a stretch to convert it to an mp3, woo

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!