Is it possible to insert recorded audio data into an existing file?
With standard Java Sound functionality, it is not possible to insert recorded sound into an existing file. The obvious workaround is to record to a new, temporary file and then put the pieces together to the file you want. If direct writing to an existing file is important to you, you could try to hack the AudioOutputStream classes of Tritonus. I think it is possible to introduce a constructor flag for “open existing” instead of “overwrite file completely” and to introduce a skip() method to move to a cue point. If you’re interested in this, Florian and I will help you to find your way through the implementation of AudioOutputStreams.