Jump to content
GreenSock

Search In
  • More options...
Find results that contain...
Find results in...
Sam

Accessing the Sound SampleDataEvent

Recommended Posts

I am trying to access the SampleDataEvent for a sound that has been loaded by the MP3Loader. I had assumed that this would be as easy as adding an event listener to the content of the loader like so:


( ( _loader as MP3Loader ).content as Sound ).addEventListener( SampleDataEvent.SAMPLE_DATA, onSampleData );

... but I am not seeing any events.

 

Help Please

Share this post


Link to post
Share on other sites

For the record there is audio. It is loaded properly and a play call results in sound issuing forth from my speakers. I am even able to do an extract on that same content and manipulate the resulting byteArray. I am just not getting the SampleDataEvents.

Share this post


Link to post
Share on other sites

Frankly, I don't have experience using SampleDataEvents, but Adobe's docs seem to indicate that they don't get dispatched unless you have NOT loaded any MP3 into the Sound instance. So if you're using it with MP3Loader, I assume you've loaded an MP3, thus it would be expected that you're not getting those events dispatched.

 

Adobe's docs: http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/events/SampleDataEvent.html

 

Also, just checking:

  1. Are you publishing to Flash Player 10 or later?
  2. Are you using the latest version of LoaderMax/MP3Loader?

Share this post


Link to post
Share on other sites

Well I'll be. I'll need to find another way to trim the loaded audio then.

 

Thanks Jack.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.

×