Hello @ all,
the following text is a copy of my question at
Stackoverflow. But since you guys should be more familiar with that kind of problem I'm asking it here to.
In my current project, I need to be able to manipulate Wave - Files. They consist of a recorded voice, which is to be anonymized. My first idea was to change the pitch and the speed, but it seems that the Java Sound API does not support something like that. I thought some basic sound manipulation would be easily possible with Java... Well it doesn't matter if there are other possibilities.
After a little research I found the OpenAL Library and the corresponding manual OpenAL Programmers Guide. So far I'm able to change the pitch, gain asf. and even add some minor effects with LWJGL (JOAL works too). If I want to listen to the result I just need to call:
AL10.alSourcePlay( int source );
But I want to save the manipulated audiofile. As far as I understand it, I need to get the datastream and work with that. After studying the manual and the sources, the only function which looks like it would something support like that, is:
ALC11.alcCaptureSamples( ALCdevice device, ByteBuffer buffer, int samples );
But the examples I found so far, suggest that this function is more used to capture inputstreams and not for manipulated sources. So the question is: Is it even possible to save a manipulated audiofile? And if it is, what would be the right approach?