Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
GoogleCodeExporter opened this issue Apr 17, 2015 · 11 comments
Closed

Comments

@GoogleCodeExporter
Copy link

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
Copy link
Author

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

  • Changed state: Accepted
  • Added labels: Priority-High
  • Removed labels: Priority-Medium

@GoogleCodeExporter
Copy link
Author

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
Copy link
Author

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
Copy link
Author

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
Copy link
Author

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

  • Added labels: Usability

@GoogleCodeExporter
Copy link
Author

Issue 11 has been merged into this issue.

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

@GoogleCodeExporter
Copy link
Author

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

  • Changed state: Fixed

@GoogleCodeExporter
Copy link
Author

[deleted comment]

1 similar comment
@GoogleCodeExporter
Copy link
Author

[deleted comment]

@GoogleCodeExporter
Copy link
Author

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
Copy link
Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant