Play an MP3 sound using its ByteArray

With AS3 we can do to load an MP3 file and play:

var sound: Sound = new Sound (new URLRequest ("sound.mp3"));

Sound.play();

It is very easy, but what happens if I already have all the ByteArray of this loaded MP3 and I just want to play?

Why cant AS3 have a simple method to simply pass the ByteArray works exactly as it works now passing a URLRequest?

In my case, I need it because I'm loading a ZIP file containing a bunch of MP3s and when decompressing them I can read the bytearray of each MP3 but I can't play them.

Have you tried loadCompressedDataFromByteArray in the Sound class?

Assuming you have the ByteArray already instantiated, try:

var sound: Sound = new Sound();

sound.loadCompressedDataFromByteArray (mp3Bytes, mp3Bytes.length);

Sound.play();

Tags: Adobe

Similar Questions

  • How to code a button to play and pause sound using its loading?

    How to code a button to play and pause sound using its loading? I used the sound load methos to fix the sound. Can someone help me?

    I can't determine where the sound is defined and where you try to control it.  This will work but is sloppy coding:

    Stop();

    adaDrut1.onRelease = function () {}

    _root.mySoundC = new Sound (this);

    _root.mySoundC.loadSound ("F #/ Bhajni1.ark", true);

    _root.mySoundC.onSoundComplete = function() {}

    This.Start (); }

    gotoAndPlay ("play2");

    _Global.myTaalLaya = 'entries Low1. "

    }

    {play_btn.onRelease = Function ()}

    _root.mySoundC.start ();

    }

    {pause_btn.onRelease = Function ()}

    _root.mySoundC.stop ();

    }

  • Does he know that "why can not play Mp3 sound using html5 in BB Simulator Playbook and Smartphone?

    Dear developer,

    I really nead help, so far I can not play mp3 sound after I developed application but in android her beautiful work.

    in the bb Simulator cannot play mp3 and wav its woking, any body know why? and I have prolem "I can't hear an echo of the sound API in the Simulator also mp3, but in android it works well, please give me solution bro, thank you to hear me."

    respect,

    Fery

    This is probably due to a missing codec.  Simulators have not the same level of multimedia support direct devices do.

  • I need to play an mp3 file using netStream.play

    I have a "film actor" who plays flv files using the code below (videoToPlay is the name of the file to play and is just a string).  I want to use the same configuration for read an MP3 also.  I tried to use mySound = new Sound(); and then mySound.attachNetStream (ns); but it gives me this error: 1061: call to an attachNetStream method maybe not defined through a reference with static type flash.media:Sound.

    I think that you can play MP3s with NetStream, unless you use FMS.

    If you mean, by timestamp, position position of the read head, use the SoundChannel position property and read it periodically (timer or event ENTER_FRAME):

    http://livedocs.Adobe.com/Flash/9.0/ActionScriptLangRefV3/Flash/Media/SoundChannel.html

  • Quality mp3 sound

    I would like to hear views and suggestions on the MP3 with the best sound quality.  I have Rhapsody compatibility with very old Sansa e280R mp3 player problems, so I recently bought a clip/zip to replace (little something for the market).  I have not done my homework, and I know that this unit is moderately priced ($39 at Best Buy), but I was expecting the same richness and sound quality I get from my iphone and my old e280R.  It's may be close enough for others, but it's not close enough for me, so I am disappointed.

    I talked to the Sandisk technical support, and they assure me that the technical specifications of sound quality for the clip/zip are equivalent to the e280R, but it isn't in my ear.  And I tried to adjust the sound using the equalizer settings - no luck.

    Then, I myself have resolved to lose the very high sound quality, like, since there is no other Rhapsody Sansa devices there considered superior by Sandisk.  But I'm curious - what are the best mp3 out there (from anyone) players, with a sound comparable to or better than that of an Iphone.

    Any ideas, opinions or information to share?

    Rhapsody has dropped support of RAX format this year, a real shame for those of us who have benefited from the R-series Sansa e200.

    As you have discovered, currently Rhapsody media are now the format WMA (Windows Media Audio) 160 kb/s. This format is used for all current devices and very good sounds, especially those who use version v2 of the e200. The advantage of using a newer device, is that you have the feature Rhapsody channels, is no longer an option with the original series of R.

    Your ears aren't deceiving you. The problem is electronic base. Although the processor of the new machines is higher than the chip of the old series R PortalPlayer, diminutive Clip has a source of energy is much smaller than the big e200 battery. A digital audio player function is to decode the data and output a current signal variable for your helmet.

    Quite simply, the e200 has more "power". If you use a more effective listener, especially the type of "in-ear monitor", you can retrieve many of which has lost efficiency. The Clip hits that subtle balance between raw power and play time. Overall, the small Clips sound is great, but there is a small difference can be heard. Austria Microsystems device has a richer sound, but a little less impact; This is because the power supply is smaller.

    If you search patiently, there are devices out there v2, but they were replaced by the original Sansa Fuze (the original is square with a rotating wheel). The v2 is a case e200 with a Sansa Fuze nestled in the breast.

    I love the Zip Clip. I wear a set with the Clip +, have different music on each machine. The zipper color display gives me album art as the faithful e200, and its size makes it very convenient. But when I really want to hear the details, this big e280 is the machine of choice. And is his new 1300mAh battery lasts until the cows home.

    Bob

  • Satellite 1690cdt: his problem - cannot play any mp3

    Hello

    I have an old 1690cdt that works just right. the only problem I want to solve, is that the sound does not work.

    If I run the windows media player, it says "no audio hardware available. I can't play any mp3 either.

    If I put an audio cd in the cdrom drive, it plays.

    If I look at the configuration of the system, there is an audio WDM crystal soundfusion cs4281 installed. According to the specifications, this should be the sound card.

    I tried updating the driver, but it does not work

    I can do, or is it just broken?

    Sincerely,

    Gerard

    Hello

    In my opinion, the sound card is ok. You need only a MP3 for Windows Media Player codec. I use the Winamp application to play the Mp3 files. This very nice program, I m very happy. Try to install it and check if it of possible to read mp3.

  • Satellite L755 - 1 CD a very silent sound from its speakers

    Hello

    I would ask for assistance if there is what I can do to have a very powerful sound on my new laptop Toshiba satellite L755 - 1 CD.

    I put the speakers at the highest volume possible, but sound from its speakers is very, very quiet, so I can't listen to music if I am just a few meters away from my laptop or when my friends call me on Skype.

    Sometimes I can't hear the sound if I'm not very close to the laptop. It has to be really quiet in the room that I hear music or talking to someone on Skype. The sound is not bad, just too quiet.
    It has speakers onkyo and I thing that they don't work well, or the volume control is not properly set.

    PLS, let me know if I can improve the volume elsewhere that in its volume control (I put the volume louder) or can I save somehow if my speakers are working properly.

    Thanks in advance.

    > Sometimes I can't hear the sound if I'm not very close to the laptop. It has to be really quiet in the room that I hear music or talking to someone on Skype. The sound is not bad, just too quiet.

    Have you noticed that silent sound using Skype only?
    If Yes, then I would recommend checking the settings of Skype.
    There you will find the audio options for microphone and speakers.

    In addition you can got to control panel-> sound-> the Read tab
    Here, you mark the speakers press the properties button. New window should appear and there you have to choose the levels tab. Here, you can increase the volume level too.

  • Windows Media Player 11 won't play CD, MP3, WMA etc. error C00D11B1.

    Windows Media Player 11 won't play CD, MP3, WMA etc. error C00D11B1. I tried MS solve this problem, uninstalling, reinstalling, etc. Same problem on 2 computers. Winamp and Itunes play fine, its not hardware or drivers. Windows XP SP3 & Media Player 11 is perfectly up-to-date.

    Hello

    · Which Microsoft difficulty he makes you run?

    You can check the link below which holds information about the error: C00D11B1: http://www.microsoft.com/windows/windowsmedia/player/webhelp/default.aspx?&mpver=11.0.5358.4827&id=C00D11B1&contextid=71&originalid=C00D0BB8

  • My speakers and headphones produce distortion whatever I play (music, videos, sound system).

    Original title: audio disturbances

    Hello

     
     
    I use lenovo T420. with windows 7 32-bit and processor intel core i7.
    My speakers and headphones produce distortion whatever I play (music, videos, sound system)
    I ve recently spilled water on the keyboard water resistant but I don't know if it has anything to do with it.
    Kind regards
    Malik Majali

    Hello

     

    Method 1: Run the following fix - it:

    Diagnose and automatically fix problems of Windows audio playback:

    http://support.Microsoft.com/mats/AudioPlayback/

     

    Method 2: Uninstall and reinstall the audio card drivers.

    See the following steps:

    (a) click Start, right click on computer.

    (b) click on properties, click on Device Manager

    (c) expand sound, video and controleurs controllers game, right click on the wireless adapter option

    (d) click on uninstall

    (e) now go to your computer / site Web of the manufacturer of the device, download the updated drivers and install them.

    Updated a hardware driver that is not working properly:

    http://Windows.Microsoft.com/is-is/Windows7/update-a-driver-for-hardware-that-isn ' t-work correctly

  • Everything I play for the sound of the web as people are in a well, a lot of echo.

    Everything I play for the sound of the web as people are in a well, a lot of echo. How can I set the audio to get a normal sound reproduction?

    original title: Audio playback

    Hello

    1. The question is limited to sounds when played on the web?
    2. What web browser do you use to browse the web?
    Method 1:
    Check out the link and run the troubleshooting and check out them.
    Method 2:
    You can also check the link and try the tips in the article.
    Tips for solving common audio problems
    http://Windows.Microsoft.com/en-us/Windows7/tips-for-fixing-common-sound-problems

    Method 3:
    I suggest that you disable improving audio speaker and check if the problem persists.
    How can I stop my music skip or break down when I play?
  • Computer only plays do not sound in my headphones, tried everything

    My computer was fine to play sounds, I got up and came back an hour later, my headset does not light and no sound was done (also the attached microphone was not picking up sound). My computer has played sound through its president very well when I had no headphones in so I tried with a pair of headphones that I know work and it has not always played. They are already my default, and I don't know what to do.

    Most often when a device does not work, it is because the driver is damaged. Re-install a new copy should help

    http://Windows.Microsoft.com/en-us/Windows7/update-a-driver-for-hardware-that-isn ' t-work correctly? SignedIn = 1

  • How to choose what program plays what, where sound?

    Hi all

    First of all, I don't know if this is the right topic, but I couldn't find other technical subjects or something similar.
    Runing windows 8 Pro and I had also a headset (USB connected) and audio (HDMI connected), but I can't select what program to play where the sound. Now, I prefer to have all the music and movies played on systems of sound and communications such as Skype, Ventrilo and Teamspeak on the helmet, which is.
    But when I play the games I'd allso favorite play the sound of some of the games on the helmet, but often games like the Sims 3 has played on the sound system.
    Is there a way to fight against this or is there some kind of software that will allow me to select what's playing where?
    Lawa Hi,

    By design, we can choose and define the different applications to play sound through the headphones and speakers of the HDMI.
     
    You can search for a third-party application that supports this feature by using your favorite search engine.
     
    Note: Using third-party software, including hardware drivers can cause serious problems that may prevent your computer from starting properly. Microsoft cannot guarantee that problems resulting from the use of third-party software can be solved. Software using third party is at your own risk.

    Hope this information helps. If you need more assistance or information on this question, reply to this post. I'll be happy to help you.

  • How can I configure firefox to play a beep sound when my yahoo or gmail mails to the?

    How can I configure firefox to play a beep sound when my yahoo or gmail mails to the?

    Hi, you could try the add-on x - notify .

    If your question is resolved by this or another answer, please take a minute to let us know. Thank you.

  • Tecra M2 - no sound using Win XP

    Hello. IM in the States by the way. I couldn't get logged in the other forums of Toshiba. (Don't ask). So ill just ask for help here.

    I have an Audio/speakers/Sound card problem. I don't know who it is, if any. I have a Toshiba Tecra M2,
    Don't know what model. Under my laptop, it just says: Tecra M2. Made in China. I got it off the coast of a friend, don't know where he got it.

    After I got it, I installed Windows XP Home sp3. Updated some hardware that could not find drivers and everything works fine
    with the exception of my sound. I have a good driver, no warning of any yellow exclamation point. I checked and double-checked
    and triple checked all volume and mute options. The volume knob on the front of the laptop is turned upward.

    I installed these patches UAA

    After checking KB888111WXPSP2 on 21/01/2010
    After checking KB888111WXPSP3 on 02/02/2010
    passed verification KB898461 on 20/01/2010

    Go to administrative tools > Services > Windows Audio is started and automatic.

    I installed the Chipset first and re-installed my audio driver utility. Still not fixed.

    I get sound through the headset. But is all torn, looks like someone took a screwdriver
    and dug around in it. The helmet is not same snap tight as it should be, he wiggles around.

    So I have to move the CAP autour until I find the right place and the Øresund will play through the headphones, but the slightest bump
    to it will cut off the sound of the headset. I tried to move card into the socket to take off all the sensors stuck in there,
    (if it is left there.) That did not work.

    So I thought that I work around the internal speakers and headphones and just buy a few external USB Portable speakers.
    so I did, and they do not play all the sounds! I am in a bind. The only thing I can think is if I update my
    The motherboard BIOS and perhaps the noise will kick in. I checked my current BIOS settings, there is nothing on the Audio or sound. But I don't know what BIOS file for in downloads. If someone could help me here I would much apreciate that too.

    If anyone has more ideas on how to solve this problem, please, please offer advice you can think. Thank you.

    Here is some info on my PC laptop Toshiba Tecra M2.

    Operating system
    -----------------
    Windows XP Home Edition Service Pack 3 (build 2600)
    Multimedia
    -----------
    SoundMAX Integrated Digital Audio
    Driver date: 01/09/2004
    Driver version: 5.12.1.5240

    If you need more info, just tell me what to do.

    Inside the headphone jack there is a small mixer. This switch disables the laptop speakers when the headset is connected. Perhaps this little switch is broken or somehow can not activate Laptop speakers when the headset is disconnected. So you can have good working sound card, but you do not hear anything on the laptop speakers.

  • Firefox plays after clicking on links for her instead of display the dialog box for play/download mp3/wav

    Firefox when trying to play wavs/mp3s after clicking on link to it instead of display the dialog to open/download. In preferences on the applications tab, I always chose "ask" in the types of wav and mp3 files, but it does not solve this problem.

    This has happened

    Each time Firefox opened

    == I'm not sure

    Firefox will play the file if you have a drive installed that supports the mime type that the server sends to this file.

    See "File handling in Firefox 3 and SeaMonkey 2": http://kb.mozillazine.org/File_types_and_download_actions

Maybe you are looking for

  • External drive icons will not change/update

    It drives me crazy... I have 3 icons from external drive, which I'm trying to customize.  The VERY FIRST icon I pasted on them worked as expected, after that changes are all or nothing... In a specific case, I see the following: I put the drive on AN

  • New MacBook has just started to freeze...

    and I'm on El Capitan 10.11.14 happens in Chrome and pictures x 3 in 10 minutes. I see this comment everywhere now and all use this version of El Capitan and all programs and different browsers. There must be a bug here and it needs to be fixed right

  • Hardware devices inoperable

    For my HP s3400t desktop computer, I use Norton 360 to run diagnostics often.  Finally, I paid attention to the report and wonder what to do with a large number of devices that are unusable or Code 10 (cannot start). They all look the same: 6T 04 ada

  • upgrade windows stop message

    Hi, I downloaded windows 10 Windows 7, but I went back to 7 upgrade windows 10 won ' t stop popping up any help?

  • BlackBerry smartphones I would like a list of BB apps.

    I would like to see the current list of all applications available on the Blackberry AppWorld site. How can I do this? EDIT: title