proofreading and micro bytearray mix

Hello, I need your help

I have a record demand for micro and I mix another sound of the song. For this step is ok I can record on my desk and the mix is good.

But I like to listen to my mix of bytearray. And even then, I have a problem.

The sound is very slow... and not even my file to save.

My code:

var epos: Number = 0

ByteArray in which audio data is stored microphone

var soundBytes:ByteArray = new ByteArray();

Gets the default microphone

var mic:Microphone = Microphone.getMicrophone ();

Security.showSettings ("microphone");

function init() {}

Sets the minimum entry level that should be considered sound

mic.setSilenceLevel (0);

The amount by which the microphone amplifies the signal.

MIC.gain = 50;

The rate at which the microphone picks up sound, in kHz.

MIC.rate = 44;

}

function called when you click on Start button Save

function startRecord (): void

{

mic.addEventListener (SampleDataEvent.SAMPLE_DATA, micSampleDataHandler);

}

function called when you click stop record button

function stopRecord (): void

{

mic.removeEventListener (SampleDataEvent.SAMPLE_DATA, micSampleDataHandler);

}

function micSampleDataHandler(event:SampleDataEvent):void

{

var temp: ByteArray = new ByteArray()

var mdata:ByteArray = event.data

var l:Number = mdata.bytesAvailable

sound_kar. Extract (temp, l/4, EPOS);

Temp.position = 0

var b:Number = temp.bytesAvailable

EPOS += l/4

var s1, s2, s3:Number

While (mdata.bytesAvailable)

{

S3 = mdata.readFloat ();

S1 = 0

S2 = 0

If (temp.bytesAvailable > = 8) {}

S1 = Temp.readFloat)

S2 = Temp.readFloat)

}

mixTracks (s1, s2, s3);

}

}

function mixTracks(l:Number,r:Number,m:Number):void

{

the function that mixes the audio microphone with background sound...

var sampleT1_L:Number;

var sampleT1_R:Number;

var sampleT2:Number;

var trackL:Number;

var trackR:Number;

sampleT1_L = l;

sampleT1_R = r;

sampleT2 = m;

trackL = (sampleT1_L + sampleT2);

trackR = (sampleT1_R + sampleT2);

trackL = trackL > 1? 1:trackL;

trackR = trackR > 1? 1:trackR;

trackL trackL = <-1? -1:trackL;

trackR trackR = <-1? -1:trackR;

mixedTrack.writeFloat (trackL);

mixedTrack.writeFloat (trackR);

}

Mixture of proofreading:

mixedTrack.position = 0;

soundPlay.addEventListener (SampleDataEvent.SAMPLE_DATA, playbackSampleHandler);

channelPlay = soundPlay.play ();

function playbackSampleHandler(event:SampleDataEvent):void

{

If (! mixedTrack.bytesAvailable > 0) //if end; return

return;

for (var i: int = 0; i < 8192 /(44/44); i ++) {}

Sample number: var = 0;

If (mixedTrack.bytesAvailable > 0)

example = mixedTrack.readFloat ();

write the sample, that is, play

for (var j: int = 0; j < int ((44.0/44) * 2); j ++) {//4 to 22 kHz? for 8 khz}

event.data.writeFloat (sample);

}

}

}

Can you help me to re-read my mixture in bytearray?

Thank you very much

Oeann

OK, I found my problem and is ok... If this can help you:

function playbackSampleHandler(event:SampleDataEvent):void

{

for (var i: int = 0; i < 8192="" &&="" mixedtrack.bytesavailable=""> 0; i ++)

{

mixedTrack.position = int (position) * 8;

position += 1;

Sample number: var = mixedTrack.readFloat ();

event.data.writeFloat (sample);

event.data.writeFloat (sample);

}

}

Nice day

Tags: Adobe Animate

Similar Questions

  • cdecl and stdcall calls mixed in a single project

    Hello

    I have a dll project that the stdcall calling convention.

    It calls any other dll (3rd party), some of them using stdcall convention call and some use cdecl.

    It seems that I can't have both!, if I switch my project convention call to stdcall Im getting error connecting (undefined symbol...) on the functions cdecl and vice versa.

    I checked, searched google and found no concrete solutions.

    The only thing I found close to a solution is to wrap the DLLs that are different from my call contracting project. is this the only way?

    Any help will be greatly appreciated

    Best regards

    Uriya

    Uriya salvation,

    The parameter Option generate is the calling convention used if no calling convention specified. But you can change the convention of calling a function by specifying _cdecl and _stdcall and you can mix them.

    The problem in your case, is that the dll header statements do not specify a calling convention and the default value is supposed to be calling convention. To remedy this, you must add the calling convention in the function declaration.

    Example: CALCCENTEROFGRAVITY_API int _cdecl CalcCenterOfGravity (int x)

    I hope this helps.

    Constantin

  • Spectrum x 2 and Micro SDXC

    Hello

    I recently bought a spectrum x 2 (product number: F7T43EA #ABU) and the manual says it has a Micro Sd slot but not will is compatible with Micro SD, Micro SDHD and or Micro SDXC.  I don't want to spend the money on a card that is not taken in charge, so which of these will it.  I really want a 64 GB SDXC card.

    Thanks in advance

    Hi David,

    If you have a Micro SD slot, it will support the Micro SD cards.

    Thank you

  • Sansa Clip + and micro sdhc 4 GB class6

    I have a problem with my micro 4 GB class6 sdhc, I bought some time in October. I used as storage of mp3 to my cell phone.

    Since it is a basic phone what can I do to connect to the computer to drag and drop songs is via card reader, I later scanned to ensure that he is not infected with virus or anything if I know that my pc is clean.

    the scan do not always go through. 4% and more it stops and do not complete the scan.

    I go back to my computer and right-click on the icon of sdhc to check the properties. the computer can detect the sd card (because the icon is there), but it does not display the content and songs more. even the SD is not displayed. capacity of 0 KB.

    I don't know if it is a virus, or maybe the lock on the card adapter switch has something to do with. Maybe I dragged songs while the lock is activated.

    What could be the problem?...

    I did a format already, but in case where (just in case) the cause is a virus, or say that the map is broken it will affect my clip +?

    BTW, I did not insert the card to my clip + so far...

    Thank you very much in advance

    Sometimes, a mobile phone will do things to a map to interfere with the use of the drive.  A solution was to reformat the card in the phone and then try again (and I could reformat and then again to the reader).

  • Fuze and micro sd

    Hi all

    I have a sansa fuze for 1 year and a few days ago I decided to use a micro sd card to upgrade capacity.

    My USB mode is MSC because my OS is ubuntu 8.04 and because it is easier to use...

    When I plug my Fuze, I see 2 HDD: my rocket and my card, it's ok

    I put some songs on Fuze and map, disconnected the mp3 player (the update of database is ok)

    But when I look at the list of songs on the "rocket", there is only the songs I put on the "rocket", but none of the songs I put on the map.

    I thought that my card was not recognized, but when I check in

    Music > records

    I see: internal and external memory uSD card, external uSD card is empty even I put something in

    Is there something to do?

    Folder to create on the map of the uSD?

    Special format for uSD card?

    Please, could you help?

    Excuse for my English...


  • Fuze and micro SD card

    I just had a rocket and would like to know if I need to load music on a micro SD card before I insert it in the drive, or I can download music on the card in the reader.  I'm not very savy MP3 and in simple terms any help would be greatly appreciated.  Thanks in advance.

    Either will work. Depends on what you are more comfortable.

  • E280 and Micro SD cards

    I use first of all the MS Media Player to extract the music from the music CD I want to listen to my MP3 player, which is be an E280 and so far it's all gone on the internal memory.  Until now, until this point, I didn't what the acceptable size was for my player to card format Micro SD and I have now come to realize that it makes a difference on the firmware you have, well.  Now, I would like to know how, step by step to start to put the music files on cards Micro SD as opposed to memory internal please?  Thank you.

    Not knowing which version of the player, you have (v1 or v2), I'll tell you a procedure that works for both.

    Put your player in MSC mode (settings > USB Mode). Connect your player. Windows Explorer (sometimes called the workstation) should open (or at least ask to) a glazing to aid memory of your card in it. If you want to create a folder of MUSIC here, as on the internal memory, it's OK.

    Now open another Explorer with your MY MUSIC folder (on your computer) that it contains. Navigate to the folder of the artist, that you want to transfer; Click on & drag the other part with the MUSIC folder on your card and drop it right (release the mouse button) on the top of this file. Fact.

    Do foam, rinse & repeat.

    This (make drag & drop mode MSC) is the only way to add music to a card in a reader from v1, but you can 'sync' (if you must) to PSG and Windows Media Player with a v2 model. I find drag & drop just as easy (or easier) and no problem with WMP control.

  • IDT HD Audio Codec and the stereo mix Option.

    Okay, so, I have this thing, but don't see Stereo Mix. I need to activate this option to record the sound from a video recording program. I tried to download the drivers, but they are not compatible. How this pop up option? I have an Inspiron 1545, by the by.

    If you are using Vista, make sure that when you are in the 'Recording' tab, you are "disabled" devices Under the list of pickups, etc., right-click on an empty space and select "Show disconnected devices". Then a source called "Rec. reading" should appear. This IS stereo mix. Right click, activate it, and then you can select it as default device and use other applications, etc.

    If you still don't see it, you may be victim of a strange of Dell off the stereo mix on some laptops. Personally, I have a Studio 1537 with IDT and he enabled stereo mix, but Dell it restricted in the past on some computers thanks to the protection of copyright.

  • 7 1800 HP Tablet: HP 1800 7 tablet and micro SD card

    When I insert my micro card (15 gb) sd of my cell phone in my hp 7 1800 Tablet it shows up under storage as being there, but I can't understand how to access my photos, videos, etc. can you help? Thank you

    What type of cell phone?  Is it Android?

    Way the easiest way is to install one of the many free file manager programs available in the game store.

    I like the one named "File Manager HD".  To play the videos, a large is called "MX Player".

    The apps work like Windows Explorer and allow you to view and open files of internal storage and external storage (SD card).

    WyreNut

  • Problem with pantone and 'effect of mix' gives 'of unexpected results.

    Hey!

    This is the case:
    Im working on one design racing car and I need a pantone mix to match a graphic film 3 m.
    I have a graphic film that will apply to the front of the car. This film of 3 m spesific equality / match pantone 165 C.
    The other half of the car is supposed to have a printed film applied. on this impression, I have a mix (complex, cannot be used in this case degraded form) from a dark place
    CMYK color and ending in Pantone 165 C. The result of the printing is not as I want it to be. Smooth smoothing on the screen has turned into something and is not quite usable.

    My question is that is can not turn the spot pantone to process, because then I will not have control over the outcome of the printer. The people of said production if they print in CMYK the result will not be 165 C.
    I need the Pantone to be printed in Pantone 165C to match the packaging film.

    I did some testprints and it seems to be an issue between illustrator and printer.

    Is it possible to solve this problem and still have total control of color?

    Greatfull for any help in this matter!

    Too everyone. Thanks for all the good advice and to comment on it.
    The solution for me was simply to send the file to the production elsewhere.

    They have the newest equipment/digital printer, there is.

    Probably not very satisfactory for the geek inside you, but he saved for sure to spend more time on
    This. Thanks again!

  • eggs and micro sd

    Will be that the bike Z phones the first phones that are capable of both formats will be released?

    dak2 wrote:

    I misread SORRY storage capacities . I went and read the standards JEDEC for UFS and was slightly

    surprised that the SCSI standards are finally implemented for access to memory.

    No worries... I don't want others to think we support such a new standard... Maybe the Z2 will give us a slot unified with support for this speed.

    Thanks for the SCSI part - it is interesting and makes sense since the storage supports increasing and parallel access.

  • How to record my microphone and the stereo mix simutaniously?

    I record my microphone only. I can record the sound that the stereo mix playing alone. but I would record together in an audio record how I can do

    I record my microphone only. I can record the sound that the stereo mix playing alone. but I would record together in an audio record how I can do

    ===================================
    The free Audacity software might be worth a try:

    (FWIW... it's always a good idea to create a system)
    Restore point before installing software or updates)

    Audacity
    http://Audacity.sourceforge.NET/

    Features of Audacity:
    http://Audacity.sourceforge.NET/about/features

    Audacity: Common editing tasks
    http://Audacity.sourceforge.net/manual-1.2/tutorial_common_ed_1.html

    Volunteer - MS - MVP - Digital Media Experience J - Notice_This is not tech support_I'm volunteer - Solutions that work for me may not work for you - * proceed at your own risk *.

  • Sound problems and micro Microsoft Lifechat LX-3000

    Hello

    About a year ago and a half years, I bought the Lifechat LX-3000 headset. They worked great for a long time, but now it seems they are mess up :(
    Two weeks, I was on my desktop Windows 7 Professional x 64 and I was getting complaints my microphone on Skype is gone completely silent and occasionally during these moments of silence, would that make a really loud cracking sound. Then I tested it in the tape and confirmed that there was a problem. He plugged out and back in and it was great to work for about 5 minutes, then he started again. I then plugged into an USB extension cable 2 meter to which he was previously connected and it worked great again for like 3 days.
    3 days later, he did it again despite it was connected to the back of the PC. I then plugged on the front of the PC, and it worked great for like 4 days.
    Today, I'm sitting here on my Windows laptop, 8 x 64 and the sound went away completely. I assumed initially that I had eliminated the USB so I plugged it on then back in and it worked very well. He then did again as three minutes later. Now, its been almost 20 minutes and it works well again.
    Anyone has any ideas at all? They are in good condition because they are a year and a half, they never took to big drops, the best that I would do is lay on my bed.
    * EDIT - however, no matter how the music is now, always adjust. Initially I thought it was a problem of power, but now they work very well: o

    Hi James,

    This problem can be caused if the LifeChat headset is not set as the default recording device or the mute button has been pressed on the inline cable.

    I suggest to follow the methods below and let know us the status of the issue.

    Method 1:

    Activate the sounds in the LifeChat headset:

    http://support.Microsoft.com/kb/935749

    Method 2:

    Activate the sound recording for headset LifeChat:

    http://support.Microsoft.com/kb/935748

    Method 3:

    I suggest you check for error messages in the event viewer. If you find error messages after return the exact error message so that we can help you better.

    Measures to check the application event log:

    a. click Start.
    b b.. in the search box, type eventvwr.msc and press enter.
    c. click the Application in the observer of events (local).
    d. Locate the event log on the right side of the event viewer window.

    Reference:

    Open Event Viewer:

    http://Windows.Microsoft.com/en-us/Windows7/open-Event-Viewer

    What are the information contained in the logs of the event (Event Viewer)? :

    http://Windows.Microsoft.com/en-us/Windows7/what-information-appears-in-event-logs-Event-Viewer

    For more information:

    Contact the LifeChat LX-3000:

    http://www.Microsoft.com/hardware/en-in/p/LifeChat-LX-3000#support

    http://www.Microsoft.com/hardware/en-in/support/contact-us

    I hope this helps.

  • Points and Picas are mixed in my docs. Stuck on the points font size...

    I'm in CS6 on a PC and I have a weird problem where my document won't go to picas. Font options seems to be stuck on the points. I tried to restart, do new documents, ect. Even if I opened a new doc set picas when I draw on a text box, it is on the points. How did this happen and how to fix it? You can see my screenshot shows Pikas in addition to the options of fonts.

    screen-id.jpg

    I think you will find that the sizes of Type show always points, regardless of the parameters of the rule. It doesn't seem to be an option to change this, but you can type the values pica in the size type box, and it will convert them.

    Keep in mind that the size is not the height of a letter, but includes ascending and descending values for full police.

  • Layers and selective color mixer

    I can't find mixer in my 13 items. I tried tutorial but I don't have either the icon or adjustments in my menu where it is. I also wonder if there is an option for selective color as in full photoshop

    To Grant tools, see post No. 2 in this discussion:

    http://www.elementsvillage.com/forums/showthread.php?t=80042

    For items +.

    On the elements.

    Hatstead is right, there are other ways to do it in elements so that I rarely use the tools above.

Maybe you are looking for