2

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 AudioInputStream.
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.

the_drow
  • 18,571
  • 25
  • 126
  • 193
fredley
  • 32,953
  • 42
  • 145
  • 236

1 Answers1

1

Try this:

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

Check this:

android-ndk

Community
  • 1
  • 1
Leniel Maccaferri
  • 100,159
  • 46
  • 371
  • 480