简体   繁体   中英

Combine two wave files to create a single smoother wave file in java

I have a requirement of joining two audio waves so that the final output audio wave should have a smoother meeting point. I meant at the joining point lets' say for 10 seconds the first audio should start fading out and the other audio starts picking up.

I have already been able to concatenate the two audio files and produce a single output but the output wave file has a abrupt change at the meeting point.

I am looking forward to some code in java (ie the crossfading should happen through java code without playing the files in any audio player And just to mention that I am not targeting the android solution.) or please point me to any helpful link demonstrating how to do the same.

What you're talking about is called crossfading. Corssfade means to slowly bring up the volume of the new song while slowly bringing the volume of the old one down. For a time both can be heard.

You might want to look at these:

java sound fade out

concatenating mp3 files or joining mp3 files using java

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM