Actionscript 3 :: Generate An X Second Silence Audio File With ByteArray And Adobe Air
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.
I want to build an air app that takes input (for example a list of filenames to be generated) from the user and generates sound files with desired naming. The sound files should be an "empty/silence" sound (wav, aif or mp3). Is it possible the generate such a file? If not, can I use an existing sound and embed it into the app and have that as a source when generating the files? The purpose of this is to get a structure of files ready in the project that will be replaced by our Sound Director. This way, we can trigger all sounds before they are created.
I would like create a application that can can create folders and short cuts to folders in the file system. The user will click a button and it will put a folder on there desktop that has short cuts to files like //server/folder1/folder2 Can you create a desktop shortcut with code in adobe air? How would you do that? How do you create a folder? I keep thinking this should be easy but i keep missing it.
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?
I'm recording audio in a Flash app and need to encode the bytearray being sent to the server. I haven't found a good encoder (client-side) to compress the bytearray before sending.
this question/challenge is inspired by the 25 lines actionscript contest. i was thinking it would be neat to do an audio entry. but i think there is no way to generate audio using only actionscript. am i wrong? can we fool the player into playing image data?
I can read an image from hard drive and get a ByteArray from its source. Is there any way to store those bytes in local SQL database? What datatype for this field I need to choose?Or maybe there is a more clever way to save an Image file itself into AIR SQL?..
I'm able to record sound with a Flash application embedded in my website, this audio is saved to a ByteArray, which I need to pass to Javascript in order to post to my server along with other required data.
I know I can use AS3 ExternalInterface class to communicate with Flash from Javascript, but what would be the appropriate format or variable type in javascript to hold the ByteArray, and how can I ensure that I won't lose much audio data when doing so?
Keeping it simple for now but assuming i have a ByteArray full of sample data is it possible to calculate the average frequency (thus a pitch) from the entire recording? Is this along the right lines? p = 69 + 12 x log2(f/440hz) ...
I am trying to retrieve the ByteArray from a file selected using the FileReference class so that I can pass this to a Web Service call that I am making to Sharepoint.Is there any way I can do this using Flash Player 9 without having to upload to a remote server first and then downloading the file to extract the ByteArray?
This is assuming you can't use Adobe Flash Player 10 and the data property from the FileReference class.
Why not have the Adobe Flash CS5 product directly generate mp4 and other formats in addition to SWF?From my chair (as an Adobe Flash CS5 user) it
-Going about using other additional software has direct effect on a software budget. -Costs extra manhours to gather information of how it is done. -Costs extra manhours/user time to process. -Perhaps even increases the likelihood for errors and noise in re-processing already processed files (SWF->{F4V,MOV,MP4}) (F4V->{MP4,MOV},)relative to the original source FLA file?
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).
I have a movie that consists of various audio files fading in and out of various scenes as the timeline progresses. The current mute button I've created only appears to stop the audio track currently playing when pressed. How do I silence the movie from the point of button release until the movie has played to the end? Just as an FYI, the audio files are loaded and managed manually on the timeline itself.
Im trying to capture mic data from a swf, stream it to adobe flash media server, and save it as a wav file. Currently I can only stream the mic data to the server and save it in FLV format. how I can covert it to a WAV or save it as a WAV?
When using sound in flash you can also do this with loading an external sound. my sound.load(new URLRequest("audio/mysound.wav")); But when you load an .mp3 file the effect of the sounds keeps playing too late. So I discovered that when you save a audio file to mp3 format there is automatically with any sound editor an insert of 1/2 to 1 second of silence. So i read on the web that this does not happen when you save it to .wav formatBut when saving it to wav format i don't hear the sound in flash anymore, only when i save the wav file, with a compression of MPG,but then there is also silence added automatically. What compression technique you should use when saving it to wav format?
I am working on a game, made with Flash (using AS3) The game has a fast ball and when this ball hits an object it has to make a sound... but the sound starts with delay (so the ball is far away when the sound is played).This sound is edited by me and it hasn't got any silences at the beginning.The method i'm currently using is the simplest one:
public var sonidoPuntos1:sonidopunto1 = new sonidopunto1()
and then...
sonidoPuntos1.play()
I am trying to introduce the file into a ByteArray and then playing it from there...
I'm having trouble getting the Adobe Media Encoder CS4 to work properly. I have tried multiple files of different lengths but end up with the same output. Nice video encoding, but the audio starts and then cuts out after a couple of seconds. The longer the video, the shorter the audio works. The logs don't report any issues.
I am making a game in AS3 / Adobe AIR that requires the user to react to certain sounds. Is there a way to inform the user up front if the system volume is muted? Moreover, is there a method to change the volume? If not, does an external cross-platform application exist that lets me monitor the volume and that I can call from Adobe AIR?
Well, i am recording the voice from heaphone and the sound data is stored in ByteArray at runtime, now can i stored as mp3 ?i want to save as mp3 file on the client system.. For that, i think i have to use air application..
There is a WSDL which have one method which take byteArray & fileName(which i want to write) as a parameter to write a file in local system, the following is the code...
public void writeLocation(byte[] byteToWrite, String fileName) throws FileNotFoundException { StringBuffer fileLocation = new StringBuffer("D:\Products\Device");
[Code]....
but the flex 2 showing the error when i searched i found out in flex 2 there is no "data" property. so i am unable to create the selected object into byteArray..
how to convert a file I have on my server (pdf/excel/ppt) to a ByteArray. The reason I want to do this is to display the dialogue open/save as to the user and I must set the Content-Type to octet-stream. The dialogue shows fine with just navigateToURL() but for pdf's it is the user's local browser setting. For a URLRequest I must set the data as a ByteArray. I'm trying to use the code located here:
I think I have a basic understanding of using bytearray and saving data to a local fileI've been able to save the data (strings) and bring them back.To start off, I have been teaching myself AS3. I have no knowledge of PHP or where to start with that. It has been said many times that you cannot make a txt file from within flash. Unfortunately this is what I need to do.I put together a map labelling app to use at work here. (it loads in a floor plan, then you can add 'nodes' that track info on each office - employee, ext, office #, data line jack, etc.) I would like to use this data in an access database that I have already running.in short, I would like to output my data from the mapper to CSV. On putting the data into a bytearray I am comfortable with marking the commas as well as line ends, but the data is not txt... is there a way to convert it
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??