-2

I need to record (without a microphone) a file with x amount of silence. For example, the user enters "5", then the program should record a file with 5 seconds of silence.

BradleyDotNET
  • 60,462
  • 10
  • 96
  • 117
user3380193
  • 51
  • 1
  • 4
  • I edited your question to make it clearer. That being said, please post your attempt to solve this problem. SO is not a code-writing service. – BradleyDotNET Mar 21 '14 at 18:02

1 Answers1

0

Found answer on this question but with some updates, in this link a code to record from mic, you need to simulate the mic, to do so in this function and write 0 instead of sample, do this each second:

function micSampleDataHandler(event:SampleDataEvent):void
{
    while (event.data.bytesAvailable)
    {
        var sample:Number = event.data.readFloat();
        soundBytes.writeFloat(sample);
    }
}

i never tried this but i think it will work, good luck.

Note: to convert output to mp3 have alook on the question above there is a library for that.

Community
  • 1
  • 1
Anas
  • 711
  • 7
  • 24