Actionscript 3 - Play Sound Parallel and Very Often - actionscript-3

I have a sound that must be played really often and the playback will overlap the playing of the same sound.
I kept my sounds really short but I can still hear the lack of plays. Does that mean when I try to parallel-play a sound 1000 times it will play it only 8 and ignore the others ? How many channels are there ?
Can I control and modify the parallel play behavior ?

AS3 maxes out at 32 channels. Make sure that once you're done playing a sound, you're disposing of its sound channel so that it can be freed up for another Sound to use it.

Related

Play same sound effect multiple times when others are not finished yet

I use cocos2d-x 3.0 on Windows, but the game should be on Android and iOS.
I want to create coin collection sound. My player can collect for example 10 coins with 0.1 seconds delay. Now I want to play the same effect 10 times with the same delay, whereas my effect length is 1 second. SimpleAudioEngine does not play that. How I can achieve that?
In other words I want to play the same sound with multiple streams. Please help me.
Size matters. If the size of .wav file is "enough" small, then it can play multiple times.

Boosting Audio Above 1 on SoundChannel

I'm dealing with an audio anomalie. I have audio that is mastered quite loud, yet on some systems, it is too quiet. Boosting the audio file anymore causes clipping.
It would be fine, except for the fact that, in my project, a lot of other sounds are in use as well. Lowering the volume of everything to match this would make some stuff impossible to hear. And again, this doesn't happen on all computers, only some.
To compensate, can I boost audio in code? The SoundChannel I'm using is already at 1.0 volume (full), and I know I can't use that property to boost it further. Is there any way to raise the audio further in code?
(I'm using Flash Professional CS5.5, Adobe AIR 3, and ActionScript 3)
After some time, I've concluded that it is apparently not possible to boost sound volume above 1 (that is, to amplify) using Flash's API. While you can set SoundTransform to a number greater than 1, it will coerce to 1 nevertheless.
If anyone has information to the contrary, you are welcome to post the answer and I'll change which answer I've accepted if you solve the problem.
You are correct. Sounds cannot be played at a volume above 1 (100%). However -- You can play two identical sounds simultaneously on different channels. This would effectively give you an audio boost above 1. But depending on the nature of the sound you may get some distortions from synchronization. If you're talking about a sound-effect without a lot of discernable Attack, you may get away with it. If you're talking about speech or percussive sound, your mileage may vary.

Using AS3 I want to do slow motion, fast forward, and rewind on audio

I googled "as3 audio slow motion fast forward rewind" and found only this of relevance: playing slow motion, fast forward , rewind in a video player in flash video player, which briefly talks about how to fast forward and rewind a video as well as two options for doing slow motion on video. I only need audio, though.
I think I might be able to do fast forward and rewind by stopping the SoundChannel and then playing the sound at a different position using addEventListener(Event.ENTER_FRAME, ~), but I'm completely lost on how to apply the advice regarding slow motion.
Side note: I use Flash CS5.5 and all the sounds I want to operate on are already in the library - I'm not sure if that's at all relevant, but... uh... yeah...
SOS
this look promising:
http://blog.andre-michelle.com/2009/pitch-mp3/

Is it possible to play an HTML5 audio element for a very specific duration (less than total duration of the sound bite)

I have a sound element that is actually a composition of several different sounds. My approach had been to only have to load a single source for sound, and play different segments based on the desired sound bite.
I can seek to the start point just fine by setting the 'currentTime' property. However, setting the 'duration' property does not seem to have any affect what-so-ever.
I've tried to use a setTimeout, but, as expected, the timer resolution is not sufficient to get consistent behavior in the audio (sometimes it does not play at all, and when it does play it's 'stop' point is inconsistent).
Is this possible? Or will I be stuck loading each sound bite in it's own individual element?
Remy Sharp has posted about this as Audio Sprites (and fixes for iOS). Does that implementation work for you?

Can I start or seek to sub-second intervals with NetStream?

I am working on a Flash Video player and am implementing the ability to start a video at x time within the span of an FLV (served from FMS). I am able to start it x seconds into a stream without any issue using
netStream.play(source, startTime);
but as far as I can tell, it only supports seconds. I am looking to be able to give a start time (or even a seek time if that is supported) in milliseconds, or really anything more precise than whole seconds.
Anyone know of any way to achieve this even by monkey patching the fl classes?
Thanks,
Doug
Well the seek will allow you to seek by a number of frames, but the spec says that it only seeks to the closes I-Frame in the FLV. That will become a problem with any method you use, because the I-Frames are the only ones that actually contain the whole picture frame (here's the gist of that).