开发者

Java equivalent of C++ sf_readf_double()

I'm manipulating .wav audio files in Android.

So far things are going well (I can record a .wav file from the mic, add echoes etc.), but I'd like to mimic the behaviour of sf_readf_double() and sf_writef_double as per libsndfile in C++ to implement more complex filters.

I have a com.sun.media.sound.WaveFileReader and WaveFileWriter objects and I'm getting at the audio data using

stream = wfr.getAudioInputStream(new File(inputAudioFileName));

which returns an AudioInput开发者_StackOverflow社区Stream.

Is it just a case of reading 8 bytes from the stream at a time into a double or is there more to it than that? I'm a little confused as other filters I'm using seem to manipulate shorts rather than doubles.


Try this:

What should I use in Android when porting C++ code written with libsndfile?

Check this:

android-ndk

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜