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 ofsf_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 manipulateshort
s rather than double
s.Try this:
What should I use in Android when porting C++ code written with libsndfile?
Check this:
android-ndk
精彩评论