sevengo8378 / as3wavsound Goto Github PK
View Code? Open in Web Editor NEWAutomatically exported from code.google.com/p/as3wavsound
License: Other
Automatically exported from code.google.com/p/as3wavsound
License: Other
Hi, first tank you for your help and your great work to provide a class that
hellp lot of people.
What steps will reproduce the problem?
All work great, but when i use
SoundMixer.stopAll();
after that, i cant play the sounds again.
What version of the product are you using? On what operating system?
v0.9, windows 7 64 bit, flash CS6,
Original issue reported on code.google.com by [email protected]
on 24 Apr 2013 at 11:28
The attached WAV file (the Devanagari letter "ka" with a horrible goraa accent)
plays fine in VLC Media Player. With AWS, it makes me sound like a
chipmunk---if chipmunks spoke Hindi.
Here's the code I'm using in ActionScript3 in an SWF on IE9 on Windows 7
Professional 64-bit:
var urlRequest:URLRequest = new URLRequest(soundURI);
var wav:URLLoader = new URLLoader();
wav.dataFormat = "binary";
wav.addEventListener(Event.COMPLETE, playWAV);
wav.load(urlRequest);
...
private final function playWAV(e:Event):void
{
var tts:WavSound = new WavSound(e.target.data as ByteArray);
tts.play();
}
Original issue reported on code.google.com by [email protected]
on 19 Jan 2012 at 6:27
Attachments:
What steps will reproduce the problem?
1. Load a wav file from attachment into a demo example.
File was recorded with WAVWriter library:
http://code.google.com/p/speechapi/source/browse/trunk/src/flash/com/adobe/audio
/format/WAVWriter.as?r=15
2. Try to play it (on my machine file is playing correct).
3. I also tried (it didn't helped) to use specific AudioSettings:
new WavSound(new SoundClass() as ByteArray, new AudioSetting(1, 44100, 16);
What is the expected output? What do you see instead?
File is not playing. Error:
Error: Error #2030: End of file was encountered.
at flash.utils::ByteArray/readBytes()
at org.as3wavsound.sazameki.format.riff::LIST/splitList()[D:\Projects\Adobe Flash Builder 4.6\Kanarek\src\org\as3wavsound\sazameki\format\riff\LIST.as:65]
at org.as3wavsound.sazameki.format.wav::Wav/decode()[D:\Projects\Adobe Flash Builder 4.6\Kanarek\src\org\as3wavsound\sazameki\format\wav\Wav.as:38]
at org.as3wavsound::WavSound/load()[D:\Projects\Adobe Flash Builder 4.6\Kanarek\src\org\as3wavsound\WavSound.as:115]
at org.as3wavsound::WavSound()[D:\Projects\Adobe Flash Builder 4.6\Kanarek\src\org\as3wavsound\WavSound.as:101]
What version of the product are you using? On what operating system?
version:0.9
operating system: Android 4.0.4 with Adobe AIR/flex
Original issue reported on code.google.com by [email protected]
on 25 Oct 2012 at 8:31
Attachments:
1. I'm trying to synchronize two sounds - an MP3 song and a recorded microphone
output. But when I play the recorded microphone output through
WavSoundChannel, it starts with a short delay of about a second(I assume this
delay is different on different computers).
I tried to use the position of the soundchannel to catch the start of the real
sound through the speakers, thinking that if the position is greater than 0, it
should mean that the sound has started playing. But the position is greater
than 0 and I don't hear the sound yet. I think it returns the right position
but there is some kind of latency due to encoding. So I cannot use the position
method to catch the start of the real sound through the speakers.
Is there a listener that I can use to get the actual sound start of the output,
so i can play both sounds(the recorded output and the MP3) synchronized?
I'm using version 0.8 on Windows 7
Thanks
Kiril
Original issue reported on code.google.com by [email protected]
on 23 Jun 2011 at 7:23
What steps will reproduce the problem?
1. use the code I have provided
2. run SoundManager.playSound(<name>);
3. there is a 1 second delay for me, i have traced to confirm this. The trace
in playSound traces 1 second before i hear the sound. The sound file is
confirmed to have no blank space in the spectrum. and it is only 6kb.
<code>: SoundManager.as
public function SoundManager()
{
buildSounds();
trace("sound manager loaded");
}
public function playSound(name:String)
{
trace("playing " + name);
sounds[name][1] = sounds[name][0].play();
trace("played " + name);
sounds[name][1].addEventListener( Event.SOUND_COMPLETE, looper );
}
private function loadSound(path:String, name:String)
{
sounds[name] = new Array("", "", path, false, false, 0, 100, 0, 0);
var wavLoader:URLLoader = new URLLoader();
wavLoader.dataFormat = "binary";
wavLoader.load(new URLRequest(File.applicationDirectory.resolvePath(path).url));
wavLoader.addEventListener( Event.COMPLETE, function(e:Event){makeSound(e,name)} );
}
private function makeSound(e:Event, name:String):void
{
sounds[name][0] = new WavSound(e.target.data as ByteArray);
}
private function buildSounds()
{
loadSound("sound/menu/itemDown.wav", "menuItemDown")
loadSound("sound/menu/itemUp.wav","menuItemUp")
}
</code>
What is the expected output? What do you see instead?
Instant play, but instead i have a 1 second delayed play.
What version of the product are you using? On what operating system?
v0.9, windows 7 64 bit
Please provide any additional information below.
run in adobe air 3.2 in flash professional cs6
Original issue reported on code.google.com by [email protected]
on 5 Sep 2012 at 10:53
1. play a WavSound and keep the returned SoundChannel in a variable
2. using a timer, try to access the SoundChannel.postion during playback
3. the resulting value is always 0.
Exected output is the current position in ms that the sound has been playing,
i.e. as with the normal Sound class. I am using the as3wavsound 0.6 version on
MacOS 10.5.8. with flash CS5.
I added a trace of the current duration (in ms) in the wavSoundChannel class to
see if I could work around the problem myself:
trace(phase / (_wavSound.samples.length / _wavSound.length));
But, for some reason the actual sound hitting the speakers is lagging with
about 1 second when I compare it with this trace. I don't mind a delay, but
since I can't calculate it I can't sync the sound with other sounds. I would
really appreciate any help on this.
Original issue reported on code.google.com by [email protected]
on 14 Oct 2010 at 10:18
line 56 in WavSoundChannel looks like:
var maxPositionInMillis:Number = Math.floor(length);
but should probably refer to the _wavSound.length like:
var maxPositionInMillis:Number = Math.floor(_wavSound.length);
Original issue reported on code.google.com by [email protected]
on 14 Oct 2010 at 10:29
Can you add documentation on how to create a .wav file from byte array data?
Thanks.
Original issue reported on code.google.com by [email protected]
on 15 Aug 2011 at 1:53
In my case i have 10000 wav (G.711) files for play depending upon contentID.
can you please let me know how i can accomplish this task.
After adding AS3WavSoundDemo.swf expressInstall.swf index.html files at my
tomcat server i am able to listen rain_loop file. Can you please tell me how i
can pass diffrent media file names for play to AS3WavSoundDemo.swf
What steps will reproduce the problem?
1.
2.
3.
What is the expected output? What do you see instead?
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 [email protected]
on 24 May 2013 at 2:20
What steps will reproduce the problem?
1. Added function to measure volume:
(100 * ((channel.leftPeak + channel.rightPeak) / 2.0))
2. Value was always very low (or 0), so I decided to measure each value in
function buffer.
Recorded sample was soft, then loud, then soft. The number seem all over the
place.
Sample output attached.
Original issue reported on code.google.com by [email protected]
on 25 May 2012 at 5:05
Attachments:
What steps will reproduce the problem?
1. add an soundComplete event listener to the channel returned by the play
method of the class WavSound
2. run the code
What is the expected output? What do you see instead?
should call the callback when the sound finished playing.
but callback is called when sound starts.
What version of the product are you using? On what operating system?
v0.4
Please provide any additional information below.
Original issue reported on code.google.com by [email protected]
on 20 Jul 2010 at 2:16
The current version of as3wavsound doesn't support playback 16 kHz audio, which
is really required in many cases, especially for speech recognition.
Even we manually remove the limitation for 16kHz in the audio setting, the
quality of the current upsample impl in Wav.as is not acceptable (the noise).
So in our case, we implemented an upsample replacement:
https://github.com/englishtown/as3wavsound/blob/feature/upsample/src/org/as3wavs
ound/sazameki/format/wav/Wav.as#L81
Out impl is copied from the following stackoverflow ticket:
http://stackoverflow.com/questions/7995470/how-can-i-resample-wav-file
I suggest you guys could consider use this algorithm to replace your current
one.
Original issue reported on code.google.com by [email protected]
on 14 Jan 2014 at 6:08
var drumLoop:WavSound = new WavSound(new DrumLoop() as ByteArray);
sound.play(); // must be drumLoop.play()
Original issue reported on code.google.com by [email protected]
on 28 Mar 2011 at 7:25
For large .wav files, there can be a long delay reading them into a bytearray
before beginning playback. Similar to flash.media.Sound, WavSound should
support loading a wav as a stream and not just a ByteArray.
Original issue reported on code.google.com by [email protected]
on 16 Jun 2010 at 12:01
What steps will reproduce the problem?
1. Load 2 wave audio files and play them. The files should have around 5-10
seconds, to have time to notice the problem.
What is the expected output? What do you see instead?
I taught that the files will be played one after another, but unfortunately
they are played asynchronous, and you can hear both of them at the same time.
What version of the product are you using? On what operating system?
0.8
Is it possible somehow to synchronize the files to be played one after another
??
Original issue reported on code.google.com by [email protected]
on 29 Sep 2011 at 6:40
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 [email protected]
on 12 Jul 2011 at 4:25
What steps will reproduce the problem?
I have a ByteArray of sound data captured from the microphone called
"soundBytes".
var snd:Sound = new WavSound(soundBytes);
var mySoundChannel = new SoundChannel();
var mySoundTransform = new SoundTransform;
var playbackTimer:Timer;
private function doPlay():void
{
mySoundTransform.volume = 1;
mySoundChannel = snd.play(0,0,mySoundTransform);
playbackTimer = new Timer(100);
playbackTimer.addEventListener(TimerEvent.TIMER, playbacklevel);
playbackTimer.start();
}
private function playbacklevel(event:TimerEvent):void
{
myProgressBar.width = (mySoundChannel.leftPeak + mySoundChannel.rightPeak)/2 * 100;
}
One would expect the rightPeak and leftPeak on the SoundChannel object to have
some value other than zero as long there is sound playing, and it does if I'm
using the standard Sound object, rather than the WavSound object.
This is not the case here... the rightPeak and leftPeak values are always zero.
Original issue reported on code.google.com by [email protected]
on 18 Aug 2011 at 6:47
To reproduce:
1. Download or create a WAV file with 8-bit samples (Ex:
http://simplythebest.net/sounds/WAV/sound_effects_WAV/sound_effect_WAV_files/bub
bles_2.wav)
2. Create a project either with the sound file embedded or downloaded and play
the sound using the WavSound class.
Behavior:
Instead of the sound being reproduced accurately, a garbled sound of the same
duration is played.
Original issue reported on code.google.com by [email protected]
on 22 Aug 2012 at 11:04
Constructing a WavSound instance with odd-length WAV data throws an exception.
Here is sample code that will reproduce the problem:
var wavLoader:URLLoader = new URLLoader();
wavLoader.dataFormat = URLLoaderDataFormat.BINARY;
wavLoader.load(new URLRequest(
"http://media.merriam-webster.com/soundc11/b/bootes01.wav"));
wavLoader.addEventListener(Event.COMPLETE, function(evt:*):void {
var sound:WavSound = new WavSound(wavLoader.data as ByteArray);
});
Expected: the constructor returns and the WavSound object is playable.
Instead: an exception is thrown:
Error: Error #2030: End of file was encountered.
Original issue reported on code.google.com by [email protected]
on 30 Aug 2012 at 5:07
All G.711 files are encoded with a background noise.
I am using the latest trunk version of library. Example of G.711 wav file is
attached.
Original issue reported on code.google.com by [email protected]
on 5 Sep 2012 at 12:53
Attachments:
Is it planned to support sample rate 8000?
Original issue reported on code.google.com by [email protected]
on 30 Aug 2012 at 4:27
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.