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 7075887
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T06:13:54+00:00 2026-05-28T06:13:54+00:00

I know how to record audio in actionscript 3. But is it possible to

  • 0

I know how to record audio in actionscript 3. But is it possible to cut away something from the final sound file in actionscript?

My use case is, that the user can jump to a specific point in the sound file (i can manage that) and start recording from there (essentially overwriting the rest of the file).

Is this possible in actionscript 3. If yes, how?

Thank you.

UPDATE:

This is the code I’ve used, and it works, but the old recording gets pitched down. I don’t know why. “selectedTime” is a millisecond value of a time the user selected in a graphical representation of the wave; 44100 is my sample rate.

existingByte = new ByteArray();
var extract:Number = Math.floor ((selectedTime)*44.1);
sound.extract(existingByte, extract);

mic.recordData(existingByte);

// in the mic class:
public function recordData(existingByteArray:ByteArray=null):void {
    if(existingByteArray == null) {
        raw = new ByteArray();
    } else {
        raw = existingByteArray;
        raw.position = raw.length;
    }
    mic.addEventListener(SampleDataEvent.SAMPLE_DATA, dataHandler);           
}

private function dataHandler(event:SampleDataEvent):void {
    try {
        raw.writeBytes(event.data);               
    } catch(e) {
        this.stopRecording();
    }
}
  • 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-28T06:13:55+00:00Added an answer on May 28, 2026 at 6:13 am

    Yes. As you are receiving bytes in from the audio stream you are appending those into the master buffer. If you want to do a punch-in like recording. You’ll need to know the offset into the master buffer where you want to punch into. So instead of writing to the buffer from the start, you’d write to the buffer from the offset the user clicked. You’ll have to relate the mouse pointer to an offset in your master buffer. Then as you receive new audio simply overwrite the values in that buffer. If you want a punch-out so it only overwrites a small section of the audio. You’ll need a end point in the master buffer where to stop writing new data as well. The user could highlight a section of the audio to get in/out points say.

    You’ll have to use ByteArrays for the two buffers. You can extract the raw bytes from Sound using Sound.extract(). Other sources of raw audio can be applied here as well:

    var master : ByteArray;  // assume this is loaded with some audio
    
    public function punchIn( startLocation : index, sound : Sound ) : void {
        sound.extract( master, sound.bytesTotal, startLocation );
    }
    

    By varying the length parameter you could do a punch in and punch out feature.

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

Sidebar

Related Questions

I want to record audio stream as mp3 file on server. I know flash
I know I can update a single record like this - but then how
Anyone know how to specify a custom record delimiter in a schema.ini file? I
I'm working on an app that will both record an audio file, and then
I'm trying to record sound using Android Emulator. I know that this question is
This is a code that will attempt to record an audio sample : but
I am building a small flash application to record audio from the client's computer.
I would like to know if it's possible using MySQL Binary Log to record
a lot of the people who talk about Record an Audio from Web Page
I am looking to record voice in as compact a file format as possible

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.