pipi7817 / as3wavsound

Automatically exported from code.google.com/p/as3wavsound
Other
0 stars 0 forks source link

Playing a wav with a lower samplingRate does not play properly. #7

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Record wav with sampling rate of 11025.
2. Load wav file into WavSound object:
var mySound:WavSound = new WavSound(fileContent, new AudioSetting(1, 11025));
3. Play mySound file: mySound.play();

What is the expected output? What do you see instead?
Expected the audio file to playback properly, but instead it was very 
fast-paced like it was not using the proper sampling rate.

What version of the product are you using? On what operating system?

Please provide any additional information below.

Original issue reported on code.google.com by blaineki...@gmail.com on 12 Jul 2011 at 4:25

GoogleCodeExporter commented 9 years ago

Original comment by b.bottema on 28 Jul 2011 at 7:22

GoogleCodeExporter commented 9 years ago
Here's what I did to sorta solve this issue...

I updated the Wav.as file in org.as3wavsound.sazameki.format.wav to add a 
resample function.

Original comment by slowbur...@gmail.com on 18 Aug 2011 at 6:30

Attachments:

GoogleCodeExporter commented 9 years ago
The solution on comment 2 worked very well and with some small modification's 
you can use actually any sampling rate, the only thing that is that you have to 
adjust the byte array properly otherwise you will hear noise. 

Original comment by medvedis...@gmail.com on 29 Sep 2011 at 6:43

GoogleCodeExporter commented 9 years ago
Author of Comment 3:
Do you know how you'd go about adjusting the ByteArray for noise removal?

Original comment by slowbur...@gmail.com on 15 Nov 2011 at 6:42

GoogleCodeExporter commented 9 years ago
Guys, this is excellent.

medvedisimion, I'm not sure what you mean. With this resampling we're close to 
a solution.

I'll integrate it into a new release if you can come up with a solution!

Original comment by b.bottema on 14 Aug 2012 at 1:52

GoogleCodeExporter commented 9 years ago
Issue 11 has been merged into this issue.

Original comment by b.bottema on 14 Aug 2012 at 1:57

GoogleCodeExporter commented 9 years ago
I integrated a modified version of the algorithm as presented by slowburnaz and 
medvedisimion.

The upsampling algorithm is very rudimentary, but it works. The quality of the 
upsampling however decreases the lower the source sample rate is. Everything is 
upsampled to 44Khz.

Original comment by b.bottema on 23 Aug 2012 at 12:16

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
I am using v 0.9 (8/23/12), and hearing a lot of noise when playing back a WAV 
file recorded at 22050 (sample file attached). Any suggestions to fix would be 
greatly appreciated!

Original comment by t4l...@gmail.com on 4 Jan 2013 at 8:27

Attachments:

GoogleCodeExporter commented 9 years ago
var increment:Number = (samplesLeft[i+1] + samplesLeft[i]) / multiplier;

should be:

var increment:Number = (samplesLeft[i+1] - samplesLeft[i]) / multiplier;

Original comment by i@luda.me on 5 Jul 2013 at 11:04