Sound.play() audio distortion/"ringing"
Hi All,
I'm having a problem when playing an MP3 file in AIR on iOS and Android. Thought I'd check here before creating a bug.
Details of problem:
- A "ringing" sound when a file is played with AIR
- Ringing doesn't occur when I access the file directly on Android and play it via standard Android audio player.
- Problem is much worse in some audio files than in others - I suspect that this relates to the audio frequency profile of the audio
I've recorded an audio file that show this problem by running an audio cable from the earphone jack of my Android device to my computer. You can find the file here:
http://www.brightworks.com/downloads/koo__two_samples.wav
The audio file contains two samples:
- The first is what we hear when playing the file without AIR, i.e. with the standard Android audio player.
- The second is what we hear when my AIR app plays the audio. Note the ringing in the background.
The code that I'm using to play the audio looks like this:
| var file:File = new File(url); | |
| var request:URLRequest = new URLRequest(file.url); | |
| var transform:SoundTransform = new SoundTransform(volume); | |
| _sound = new Sound(); | |
| _sound.load(request); | |
| _soundChannel = _sound.play(); | |
| _soundChannel.soundTransform = transform; |
I think all this is fairly standard. Am I doing anything incorrectly?
Has anyone seen (heard) this kind of problem? Is this a bug? Are there workarounds?
The ringing is in the 3000-4000 Hz range - is there a way to stomp on - I mean 'equalize' - these frequencies down to a lower volume?
Thanks,
Douglas
