stevenlow / javacv

Automatically exported from code.google.com/p/javacv
GNU General Public License v2.0
0 stars 0 forks source link

Concatenated audio files are distorted when formats are different #465

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?

1.Download the files which includes the java source
2.Compile and run the program, passing in the files to be concatenated and an 
output file name.
3. Listen to the output file name

What is the expected output? What do you see instead?
What I expect is a file can can be listened to and is clear. 

What version of the product are you using? On what operating system?
I am using the latest version (not sure of specifics).  Running in Windows with 
a Java 6 JRE

Please provide any additional information below.

Trying this with MP3's seems to work fine but .wav and .aiff files end up 
distorted.  Seems like the recorder isn't detecting the change of file format 
and continues to encode based on the first file that was opened.

Original issue reported on code.google.com by PeteHelg...@gmail.com on 24 Apr 2014 at 2:42

Attachments:

GoogleCodeExporter commented 9 years ago
Ah yes, that's right. The resampler doesn't get reinitialized if the input 
format changes. Let me see what I can do about that.

Original comment by samuel.a...@gmail.com on 25 Apr 2014 at 12:08

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
Ok, I think I fixed that in this revision:
http://code.google.com/p/javacv/source/detail?r=e23dce1c15ac0fff5c1d386180477f18
e400890a
It works with your sample files anyway. Let me know how that goes! Thanks

Original comment by samuel.a...@gmail.com on 25 Apr 2014 at 1:16

GoogleCodeExporter commented 9 years ago
Excellent!  Works like a charm!  I am encouraged because I was looking at the 
same segment of code for a possible change (so I am getting my head around the 
code a bit). I understand that this is a bit of a corner case but being able to 
open a recorder and then send a series of audio streams to it seems like a good 
feature to have.

Thanks again! 

Original comment by PeteHelg...@gmail.com on 25 Apr 2014 at 2:43

GoogleCodeExporter commented 9 years ago
Great! Incidentally, I included the fix in the newest release of JavaCV 0.8 now 
at GitHub: https://github.com/bytedeco/javacv

Enjoy and thanks for reporting!

Original comment by samuel.a...@gmail.com on 29 Apr 2014 at 12:04