Actionscript 3 :: Adobe Flash : Playing Speex Audio From A File
Aug 5, 2010
I have tried really hard to find an example showing how to play speex encoded audio in flash. I tried the following code -
var connect_nc:NetConnection = new NetConnection();
connect_nc.connect(null);
var stream_ns:NetStream = new NetStream(connect_nc);
[Code]....
I tested the above code with .flv videos and AAC encoded audio files and it works just fine. But when I try stream_ns.play("sample.spx") I get a stream not found exception.
Am I using the wrong container (.spx) for speex audio. Is playing speex audio from a file supported?
View 4 Replies
Similar Posts:
Apr 8, 2005
I have tried really hard to find an example showing how to play speex encoded audio in flash. I tried the following code -
var connect_nc:NetConnection = new NetConnection();
connect_nc.connect(null);
var stream_ns:NetStream = new NetStream(connect_nc);
[code].....
View 1 Replies
Dec 7, 2011
I want to play *.spx files which encoded by Speex on the Web.But I have no knowledge of Flash/Flex or any Flash Audio codec. After Google search for a whole day, I got some solutions, that is:
Do something wrapping Speex files with a FLV container because that the Speex is only playable as the audio codec in a FLV container.Now I can play a SPX-Audio-Only FLV file in Flex, I use netStream.play("audio-only-speex.flv"), But I donot know how to wrap a Spx file with FLV container using ActionScript.I have never heard FMS stuffs before, as well as I'm not sure whether my virtual host can support or not...Convert every Spx files to MP3.
I think the best solution is decoding Spx in AS3, Yes, I'd like to make a Spx Flash Player.So, I downloaded Speex Library from speex.org, installed Adobe Alchemy. After ./configure;make the libspeex, build libspeex/speex.c out a libspeex.swc via Alchemy. then, I donot know how to do next. How can I decode the speex audio with AS3? My libspeex.swc: [url].....
In addtion, should I rewrite the libspeex using Alchemy API before build the libspeex.swc? Although I am not professional in AS, but I have a strong ability to learn.
View 2 Replies
Mar 22, 2011
I am able to record sound from microphone, encode it using SPEEX and write into ByteArray. I want to play it back. If I try using Sound object the audio is messed up. Speex uses 16kHz for encoding and Sound Object needs 44.1kHz for playing audio. How am I supposed to play this encoded sound.
View 1 Replies
May 4, 2011
I'm implementing a very simple audio-only RTMP server.I have my client code like this:
// get the default mic
var mic:Microphone= Microphone.getMicrophone();
// best quality (picks up all sounds, no transmission interruptions)[code].....
Then on the server, I keep receiving audio packets with size of either 43 bytes or 11 bytes (no other sizes found yet).My questions are:
Why do I get size of either 43 bytes or 11 bytes (from SPEEX encoding?)?
Is the 43 bytes = 1 head byte + 42 data bytes?
What is the size of 11 bytes?
How should I process or convert the SPEEX to raw data, so that my server side app can use this audio data? My current implementation:
I pick up all 43-byte packets (drop all 11-byte packets);
Skip the first 1 byte;
Decode the left 42 bytes using Speex library.
How should I convert the raw data back to SPEEX audio data?
View 1 Replies
Aug 31, 2009
I have some animation (programmatic, I'm NOT using keyframed animation in timeline), and some music I want to play in the background. Once the music file reaches the end (about 30 seconds long), I want to trigger the end of the animation functions.I figure I could either use an actionscript timer to trigger the end of the animation or a keyframe with actionscript that is placed on the timeline near the end of the song but these methods assume knowledge about the duration of the wave file. If I changed the framerate or updated the external wave file, these triggers would possibly no longer sync upIs there some sort of event listener or other detection method for an audio file to signal it has finished playing? Or maybe there is a way to get the duration of the audio file to use in the timer
View 3 Replies
Dec 15, 2011
I would like to generate a sound in Adobe Air using ByteArray. The sound should be a silence of x seconds. I found this code that I am using to generate the bytes:
private function encode(data : ByteArray) : ByteArray
{
var channels : uint = 2;
var bits : uint = 16;
[Code].....
But when I save the file using Filereference and import it into a flash file I get an error message saying that there were problem reading the file.
View 1 Replies
Jan 5, 2011
When i am pointing to an FlV it's playing successfully. But when it comes to a speex file. I am getting an error StreamnotFound. How to resolve this issue?
View 2 Replies
May 15, 2007
I'm looking for a (free) flash player that I can embed in my site and use to play a .m4a (.mp4 with AAC audio) file that will be obtained using a URL (i.e. it's not local to the server hosting the web page).I've tried searching on google for one, but either I'm searching wrong or no one has made such a thing. Ideally this would be very simple (small user interface with play button and maybe a progress bar) and it would be easy to have multiple instances of on an html page (can create the player with an <object> tag).
View 7 Replies
Jan 28, 2012
I think it is loading the whole audio first into the swf, but I would like to get confirmation from someone more knowledgible.[code]I want it to stream the audio when the button is clicked only so that 100 of these swf will not slow down a whole webpage from loading.[code]I only start getting concerned when I noticed that on FF and Chrome, the page loads really quick but when I open the page in IE, it takes a very long time for the page to appear.
View 3 Replies
Oct 22, 2010
I've been trying to play an external sound file in Flash and failing miserably.[code]...
The problem with this code is, I can only run it while it's on a live server (the link is obtained from a MySQL database via XML), so I can't tell if any error when it's being run. Then again, I can't see how the above code can lead to any problems.
View 1 Replies
Jun 23, 2011
Update: With the latest Adobe AIR 3 Beta, Adobe added this functionality to their SDK.
http:[url]....iOS Background Audio Playback Support — Developers can now write multitasking iOS applications that can play audio while in the background, including music or voice chat from a conferencing application.
With the new release of AIR SDK 2.7 and Flash Builder 4.5.1 you can "Take advantage of new features in iOS 4 like multitasking..." (from http:[url].....Searching a bit I found out that this "multitasking" does not include true background process, like playing audio while the app is in the background.I know this is new but does someone knows if it is possible to keep audio playing in the background?
View 3 Replies
Nov 13, 2010
so I have 3 swf's that im loading with buttons into the main swf. The thing is that these 3 external swf's have embeded flv's. when switching between the swf's with the buttons, im using vid1loader.unload();the only thing is that while the video switched to the other video like it should, the audio keeps running on any number of videos(swf's) that are loaded. My question is how do you stop the audio when using simple Loader and URLRequest to load the swf's?
View 1 Replies
Dec 14, 2011
So I'm creating a movie clip using flash... Is there any way to start playing the movie from a certain frame (lets say frame 550) which I hit Ctrl + Enter So I don't have to watch the entire movie to test it?gotoAndPlay(550) doesn't work.
View 2 Replies
May 31, 2009
I deployed a website a couple of days ago which is written entirely in Flash. On one of the pages there is a video which plays in the Flash Player. I have noticed that when I leave the video playing and select a button to take me to another page, the other page comes up but the audio keeps playing from the prior page. Worse yet, if I go back to the page with the Flash Player, it now relaods again and there are two audio tracks. Can someone tell me how this code is solved? There must be some Actionscript 3.0, which I'm using, which kills the player whenever you enter a different page?
View 1 Replies
Jul 9, 2011
I realize it is possible to play audio with Flash and HTML5 by passing a URL.
However, is it possible to get a reference to an audio file using a file browser (either with HTML5 or Flash), to then play this local file, again using either Flash or HTML5?
Of course, this should happen without the interference of a server. Since the file is already on the local system, it does not make sense to route it through a server only to receive the same file again.
View 1 Replies
Dec 20, 2010
I recently installed Adobe Flash Professional CS5, but now any SWF I have on my computer won't play. If you double click on them the files aren't recognized by any program. A pop-up window then asks if you would like to search the net for the appropriate program. I downloaded the latest flash player, but that didn't work either.
View 2 Replies
Sep 30, 2010
I'm building a mobile MP3 player with AIR, which streams audio using the Sound class's .load() function. I'd like to cache this audio as it's downloaded, to the the user's SD card. Is this possible without having to download the file twice??
View 2 Replies
Nov 25, 2011
For a class project I have to make kinetic typography and so I need text to go along with some audio from a movie (in Flash). Every time I press enter to preview what I've done and what I have to do next, the audio starts and doesn't stop till it's done and this is a little over a minute long, and it's really annoying. If I don't start from the first keyframe, I can't even hear the audio, it doesn't play if I play from the middle. How do I press enter to play and have it stop when I press enter again? I can load the swf by CTRL+ENTER but then I can't see what frame I'm on and what frame I want. :|
View 4 Replies
Aug 12, 2011
I have a flash document (Actionscript-3) with play button on top of a image, and an audio is played when the button is clicked. How do I make the play button disappear when it is clicked and audio is playing. The button should reappear after the audio has finished playing.
View 1 Replies
Jan 7, 2012
I have a Flash CS5/AS3 project, a large Flash game, that uses a LOT of animations. I've divided these up into a MovieClip on a Scene, with corresponding actionscripts and events, for the "exploring screens", and another MovieClip on a Scene for one of the challenges, and another such set for another challenge. This method allows me to put only the animations that section needs into the corresponding MovieClip, and link the events of the scene to its MovieClip.
However, I obviously have to link these. I use the following to do it:
stop();
thismovieclip.stop();
gotoAndPlay(1, "THAT_SCENE");
The next movieclip starts automatically when the next scene shows up. This works well in theory. But, though the correct Scene shows up, that scene's movieclip is skipping erratically (as opposed to playing smoothly), and its audiocues are playing, along with the audiocues from another movieclip that I neither called nor have on this Scene. (Mind you, that movieclip hadn't even RUN yet.)
View 1 Replies
Mar 16, 2012
I have made a mp3 player that is working fine, it plays a mp3 radio stream for several hours (last crash was after 6,5 hours) and then it crashes without any message or exception. This is very difficult to debug because it only happen after a couple of hours with the same stream. It appear in all browsers so it is a Adobe Flash problem or is this a buffer problem?
Must i use other buffering settings to play MP3 streams? Does anybody know this problem and what can be done to avoid this? Also another question is why memory consumption after hibernation of the pc is growing dramaticly (every second it eats a couple of 10Kb). After refreshing the page it is stable again. Why is this happening? Mp3 player is made in Flash 9 (CS3) with AS3 and the player is Flash 10 (latest). Running on Windows XP Prof with 3GB RAM.
View 1 Replies
Apr 16, 2012
I'm building a project and I need the audio to be of the highest quality when played back. I am using .wav files and I'm not too sure how to make them work.
I've tried the: play_btn.addEventListener(MouseEvent.CLICK, playSound);
function playSound(event:MouseEvent):void{
SoundMixer.stopAll();
var s1:Sound = new Sound(new URLRequest("Sound.wav"));
s1.play()
But I guess it doesn't work because it's not mp3. I also tried embedding it into the hit and down parts of my button but the playback is weird, it plays slower and broken up. I'd like there to be some sort of function buttons such as play, pause, stop and some kind of time slider like for video playback if that's possible too?
View 2 Replies
Sep 13, 2011
The following AS3 code is sometimes causing the audio to play multiple times, almost simultaneously like a crazy echo. It usually works ok with that URL but when I use a [URL]... it always freaks out. On rare occasions I think the issue has happened with local files even. I copied this code from somewhere else so I don't entirely understand it. Do you see a problem with this implementation or is Flash just crazy?
[Code]...
View 1 Replies
Apr 16, 2010
With AIR 2 allowing access to mic data, it's possible to save/process audio locally. Adobe provides a WAVWriter example but is there any API access to the Speex codec?
View 1 Replies
Aug 26, 2010
After installing the latest version of flash (10.1 I think) it keeps crashing while playing on a game that requires it. I have uninstalled and reinstalled and it just keeps happening.
View 2 Replies
Oct 1, 2010
Is there any possible way to play a .jpeg sequence using .flv player on-the-fly ? I mean, by not needing to convert the entire sequence into one single .flv ? Since I'm not familiar with flash neither action script, I was surfing the web in hope to find any template or tips about similar things to that but I couldn't...
Here's the main list of features:
1- Browse button to load a sequence eg. < filename >####.jpeg
2- Play button with a slider time
3- Previous and next frame-by-frame buttons
4- FPS slider from 0 to 30
My main reference is this stand app called Cyber-D's Image Sequence Viewer.
View 1 Replies
Mar 1, 2012
Adobe's "SWF File Format Specification v10" says that Speex encoded data can be used for streaming sound (a little clarification of the "streaming sound" definition here: "The SWF file format supports a streaming sound mode where sound data is played and downloaded in tight synchronization with the timeline. In this mode, sound packets are stored with each frame." - this has nothing to do with any FMS streaming, no ActionScript needed - just plain SWF).This should be accomplished by using a single SoundStreamHead2 tag with StreamSoundCompression set to 11 (which means "Speex", as stated in the abovementioned Specification) and then N pairs of ShowFrame and SoundStreamBlock tags. However, this does not work - Flash Player plays no sound when playing the SWF generated by me this way. Please note, that I am capable of generating such SWFs containing streamed MP3 or PCM data, which then play perfectly. Just not Speex...
I strictly conform to the Specification:URL...I tried the streaming sound approach as well as the event sound - both do not work.Moreover, I was not able to find (anywhere on the Internet) any sample SWF with streaming sound (nor event sound) encoded in Speex. Do they even exist? Anyway, Flash CS5.5 is not capable of generating them.I would just like to know whether Speex support for SWF streaming sound can be found anywhere else than in the Specification. (I know that FLV can contain Speex and that Flash Player can stream Speex from a microphone and that FMS can stream Speex to its clients, but this is not what I am asking for)
View 1 Replies
Jun 13, 2010
I am currently working to a Role-Playing Game in Adobe Flash CS3 with ActionScript 2. I must include doors inside rooms, but when I do that, my player dissapears. I use this code:
Code:
...
for (var i = 0; i<mapHeight; ++i) {
for (var j = 0; j<mapWidth; ++j) {
this.attachMovie("tile","t_"+i+"_"+j,++d);[code].....
View 1 Replies
Nov 23, 2010
From what I have read, using Speek over Nellymoser is advantageous, but I can't figure out how to use it with a Flex 4 Microphone object. For instance, the last code line:
[Code]...
View 1 Replies