Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7689649
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T20:12:47+00:00 2026-05-31T20:12:47+00:00

We’re writing a flash application that can download a MP3 file, convert it to

  • 0

We’re writing a flash application that can download a MP3 file, convert it to a Sound object, get the raw data and make some processing (like adding sounds, change octaves). After the processing, we want to send the data back to the server in chunks, so the server will be able to glue the data together and recover the new generated file. The problem is: if we send to the server “wav” pieces of sound, we are able to glue them together without any problem in the generated file. However, if we convert each wav piece to a mp3 file (so we can send a smaller file to the server) and join the mp3 files at the server, the result is a sound with some problems at the merge point.

This is how we load the mp3 file from the server:

sourceSnd.load(new URLRequest("sample url to mp3"));
sourceSnd.addEventListener(Event.COMPLETE, carregou);

This is how we convert each piece of mp3 to bytearray and wav:

sourceSnd.extract(buffer, tamanho2);        
...process the extract sound and....
var bytesWav : ByteArray = new ByteArray();
buffer.position = 0;
this.wavWriter.processSamples(bytesWav, buffer, 44100, 2);

If we send each mini-wav file back to the server (for example, using a socket), we are able to glue them together without any problems. However, if we convert each wav bytearray using this code:

bytesWav.position = 0;
var mp3Encoder : ShineMP3Encoder = new ShineMP3Encoder(bytesWav);
var objeto : teste = this;                                  
mp3Encoder.addEventListener(Event.COMPLETE, function(event : Event) : void {
    objeto.socket.send(mp3Encoder.mp3Data);
});
mp3Encoder.start();

after joining the files, the mp3 file created has many sound problems at the “merge” points.

How can we avoid such sound problems?

Client-side technology: AS3
Server-side techonology: grails

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-31T20:12:48+00:00Added an answer on May 31, 2026 at 8:12 pm

    Turns outs this was caused by the process of enconding each piece of the wav to mp3. The encoder was converting them to whole mp3 files, adding silence to the first and the last frames of each piece. You can see the detailed explanation here: http://lame.sourceforge.net/tech-FAQ.txt

    To solve this problem, we had to edit the ShineMP3Encoder source code so it wouldn’t add the start and end frames for each piece processed (turning it in a “chunk processor”). This solved the problem and we were able to stream the modified mp3 file from the client to the server.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
link Im having trouble converting the html entites into html characters, (&# 8217;) i
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I have just tried to save a simple *.rtf file with some websites and
I have a jquery bug and I've been looking for hours now, I can't
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
I've got a string that has curly quotes in it. I'd like to replace
I have a French site that I want to parse, but am running into
I want use html5's new tag to play a wav file (currently only supported
In my XML file chapters tag has more chapter tag.i need to display chapters

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.