How can I create a function of sound volue from time using AudioQueueBufferRef??

I have a question how can I analyze class AudioQueueBufferRef, for creating a function of sound volue from time?? Here is what I get . there is AudioQueueBufferRef fillBuf = audioQueueBuffer[fillBufferIndex]; volume height is 2000 elements from SInt16* coreAudioBuffer = (SInt16*)fillBuf->mAudioData. so function looks like H(t*i)=coreAudioBuffer[i] where t = 1/sampleRate = 1/22050 but here is a problem. my program gets sound and uses a class AudioStreamer for this. AudioStreamer has 3000 lines when I play music from Free Internet Radio - SHOUTcast Radio - Thousands of Free Online Radio Stations. internet radio - my problem is as follows either I dont know where 85 % of sound information is or I dont know how I can analyze class AudioQueueBufferRef
Here is the code where I analyze Buffer.
{@synchronized(self)
if ([self isFinishing] || stream == 0)
return;
inuse[fillBufferIndex] = true; // set in use flag
buffersUsed++;
// enqueue buffer
AudioQueueBufferRef fillBuf = audioQueueBuffer[fillBufferIndex];
fillBuf->mAudioDataByteSize = bytesFilled;
// ======>in this place I analyze Buffer
if (packetsFilled)
err = AudioQueueEnqueueBuffer(audioQueue, fillBuf, packetsFilled, packetDescs);
else
err = AudioQueueEnqueueBuffer(audioQueue, fillBuf, 0, NULL);
when bitRate = 24 buffer has the following options int size=(fillBuf->mAudioDataByteSize) == 2000 double sampleRate=asbd.mSampleRate == 22050 numberOfChannels = asbd.mChannelsPerFrame == 1 it turns out that duration of play buffer float bufferTime =(size/numberOfChannels)/sampleRate == 0.1 number of buffers per second float numBuffersInOneSeconds == 1,5 duration of play all buffers per one second numBuffersInOneSeconds * time == 0.15 so it is 15 % of all information
as a result If buffer comes at 0.0 seconds he lasts up to 0.1 seconds.farther in my function there is no volume. second buffer comes in 0.7 seconds and lasts up to 0.8 seconds. but in reality the sound doesnt breaks. Maybe I'm doing something wrong .please tell me.
just for comparison
when bitRate = 32 buffer has the following options int size=(fillBuf->mAudioDataByteSize) == 2000 double sampleRate=asbd.mSampleRate == 22050 numberOfChannels = asbd.mChannelsPerFrame == 1 it turns out that duration of play buffer float bufferTime =(size/numberOfChannels)/sampleRate == 0.1 number of buffers per second float numBuffersInOneSeconds == 2 duration of play all buffers per one second numBuffersInOneSeconds * time == 0.2 so it is 20 % of all information
when bitRate = 32 buffer has the following options int size=(fillBuf->mAudioDataByteSize) == 1660 double sampleRate=asbd.mSampleRate == 44100 numberOfChannels = asbd.mChannelsPerFrame == 2 it turns out that duration of play buffer float bufferTime =(size/numberOfChannels)/sampleRate == 0.02 number of buffers per second float numBuffersInOneSeconds == 10 duration of play all buffers per one second numBuffersInOneSeconds * time == 0.2 so it is 20 % of all information

You cannot write custom commands for expressions.
That being said, there are a couple of options:
Create a subsequence with a single step. Use a parameter of the sequence as "function parameter".
Create a custom step type including a substep module which implements the function. Add an edit substep to enable the user of the steptype to gracefully change the parameter.
Store the variable parameter in a local/file global variable and modify the value in each step. This will, at least, keep the "function" the same for every step.
Norbert

Similar Messages

  • Certain Numbers templets allow you to drag and drop contacts to populate cell data, how can I create that functionality in my own tables?

    Certain Numbers templets allow you to drag and drop contacts to populate cell data, how can I create that functionality in my own tables?

    If you haven't come across the workarounds thread you may find helpful tips there on this and other ways to work with Numbers 3.
    ronniefromcalifornia discovered how to bring contacts into Numbers 3. As described in this post:
    "Open Contacts
    Select all the cards you want
    Copy
    In Numbers, in a table, select cell A1
    Paste
    Boom. Works great. Even brought in the pictures. Cool."
    So instead of drag and drop, just select in Contacts, copy, and paste into Numbers
    SG

  • How can I create a master PDX that pulls from multiple other PDXs?

    I process aviation maintenance manuals, with the individual manuals having their own PDX. How can I create a master PDX that pulls from the individual PDXs?
    I have access to myriad versions of Windows and Acrobat so there's that...

    I’ve got 100s of manuals each with their own PDX. I’ve been asked to create a master PDX that in effect combines all of the individual PDXs into a single (cross-manufacturer, cross-fleet, cross-manual-type) searchable PDX that can be easily updated.

  • How can I create a function using TestStand variables and call it from a step's Pre-Expression?

    In one sequence I have dozens of Pre-Expressions which are almost the same thing, like this...
    Locals.tagID = (Parameters.singlePhaseEnabled ? "L" : "D") & Str(Locals.phase) & "006"
    ...and the only thing different is that three digit string at the end ("006" will vary). How can I write a function that I can call from a step's Pre-Expression so it would look something like this? ...
    Locals.tagID = MyNewFunction("006")

    You cannot write custom commands for expressions.
    That being said, there are a couple of options:
    Create a subsequence with a single step. Use a parameter of the sequence as "function parameter".
    Create a custom step type including a substep module which implements the function. Add an edit substep to enable the user of the steptype to gracefully change the parameter.
    Store the variable parameter in a local/file global variable and modify the value in each step. This will, at least, keep the "function" the same for every step.
    Norbert

  • How can I create a array with all files from a directory

    How can I create a array of files or varchar with all files from a directory?

    I thought the example could be improved upon. I've posted a solution on my blog that doesn't require writing the directory list to a table. It simply returns it as a nested table of files as a SQL datatype. You can find it here:
    http://maclochlainn.wordpress.com/2008/06/05/how-you-can-read-an-external-directory-list-from-sql/

  • How can we see status of all Requests at a time using any tables?

    How can we see status of all Requests at a time in the Info cube or ODS using any tables? what I am facing was while I run a Process Chain in some data targets red requests remains and due to this all other requests doesnot available for reporting.
    Now is there any T-Code or Table to view all requests in a single shot.
    Thanks in advance,
    Raj

    Hi Go for RSMONICDP give timestamp and u'll have it.
    Please assign points if useful
    Edited by: Aadil on Jan 21, 2008 7:43 AM

  • How Can I Create a Function to Return to a Specific Menu on DVD Studio Pro?

    Hello, I am currently building a DVD for a TV series I created while in college, and I'm having trouble figuring out how to create a function within the DVD that lets the user select the title or menu buttons on their remotes and have that return them either to a) the main menu or b) the menu they were just at, ie episode select or chapter select. Any help is appreciated! Thanks!

    Thanks for the help. I'm still a little confused on how to get it select which menu that I would like to return to.

  • How can I create a diagram where equal data from different cells will be added to one sector?

    Hi,
    I'm a new Mac user, so I have a lot of problems and questions every day. Moving to Mac from PC is not an easy thing)
    Here is my problem:
    I need to create a few diagrams for my science work, but can't correct one mistake. Every time one data from one cell from the table takes its own place in the diagram. But I need to ceparate equal data to show it is one section.
    An example:
    Sex
    Age
    Female
    18
    Female
    18
    Female
    18
    Female
    25
    Female
    30
    We need to create a diagram to show that we have
    60% - 18 years
    20% - 25 years
    20% - 30 years
    But Numbers doesn't show it that way. Here how it does:
    So please help me. How can I do that?

    Hi ProCauda,
    Some example data of people and their age:
    The COUNTIF function will give the number of people of each age.
    In another table, B2 contains this formula (and Fill Down to the bottom of B)
    =COUNTIF(Table 1::B,"="&A2)
    In this example, 3 people are 18 years old, 0 people are 19 years old, and so on. Use this table to calculate each age as the % of the total, then use that as the data for your diagram (graph, chart).
    Regards,
    Ian.

  • How can I create and design a page UI from blank page in jdev10g?

    Hi.
    How can I implement a page from scratch page?
    I can create a master-detail page as the OBE site.
    But I'm not sure how to create page using component pallets, instead drag data-control model to page.
    It means I should design UI with component pallets,
    How can I do?
    Thanks.
    Edited by: user10615931 on 2009-8-18 上午4:13

    Thanks.
    It is helpful to me.
    What I want to do is use component pallets and add action to the component for creating a page instead using executeWithParam operation and drag view object from datacontrol to create page.
    How can I do?
    Thanks

  • How can i create a hyperlink annotation on a pdf file using preview? the tool is removed from the toolbar

    It seems that the tool to create an hyperlink on a pdf file is removed from the toolbar!

    In order to initiate printing by clicking a button, the button has to have either an "execute menu item" type action or use the "print" JavaScript method. As you guessed, the former won't work since there are no menu items to execute, and the latter can only work if the particular PDF viewer you're using supports it. I'm not aware of any that do on iOS.
    The button doesn't appear because you're probably opening it in the default PDF viewer, which doesn't support forms at all. If you were to open the form in Adobe Reader, you'd see the button but it wouldn't work.

  • How can I fix repetitive 'fontd' crashes after recovery from time machine backup?

    After recovery from time machine backup (Disk Utility told me to reformat my internal hard drive) i got annoying repetitive prompts from crashing 'fontd'. How can I fix it? Anyone suffering from the same disease?

    Back up all data.
    Launch the Font Book application and validate all fonts. You must select the fonts in order to validate them. See the built-in help and this support article for instructions. If Font Book finds any issues, resolve them, then boot in safe mode to rebuild the font caches. Boot again as usual and test.
    Note: If FileVault is enabled under OS X 10.7 or later, or if a firmware password is set, or if the boot volume is a software RAID, you can’t boot in safe mode. In that case, ask for instructions.

  • How do I create a recovery partition when restoring from Time Machine?

    I am planning to replace the HDD in my Macbook Pro with an SSD. I've used Time Machine to backup my HDD (running Mountain Lion) but am trying to find the best way to restore my Time Machine backup to the new SSD once installed.
    Given that the new SSD will not have a bootable OS X Recovery partition, I have created a bootable OS X Recovery drive on a USB thumb drive using OS X Recovery Assistant.
    In order to ensure that the new SSD has the OS X Recovery parition, should I:
         (1) reinstall Mountain Lion on the SSD then recover my data from Time Machine; or
         (2) can I simply use the Restore from Time Machine option in OS X Recovery to do it all at once.
    I can't seem to work out whether option (2) will create the OS X Recovery partition on the new SSD or just recover the system partition.

    Turns out the OS X Recovery partition is only created on a fresh install of OS X. Restoring via Time Machine will not do the trick.

  • How can i create f4 functionality

    Hi frds,
    My requirement is diff plant create diff report no , but all the plant are see all the report no.
    I want to prevent for every one plant that is one plant created report no not see other plant.
    Is it possible ,Pls suggest me.
    Thanks in advance.

    HI ,
    r u using the Module Pool Program?
    If so u can add functionality in  the POV of the field.
    Other wise use the below function module.
    DATA: BEGIN OF lt_table OCCURS 0,
              dappl TYPE dappl,
              cvtext TYPE cvtext,
            END  OF lt_table,
            lt_return LIKE ddshretval OCCURS 0 WITH HEADER LINE.
      SELECT dappl cvtext FROM tdwp INTO TABLE lt_table.
      CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
        EXPORTING
          retfield               = 'DAPPL'
        DYNPPROG               = 'SAPLIQS0'
        DYNPNR                 = '7200'
       DYNPROFIELD            = ' '
       STEPL                  = 0
       WINDOW_TITLE           =
       VALUE                  = ' '
          value_org              = 'S'
       MULTIPLE_CHOICE        = ' '
       DISPLAY                = ' '
       CALLBACK_PROGRAM       = ' '
       CALLBACK_FORM          = ' '
       MARK_TAB               =
    IMPORTING
       USER_RESET             =
        TABLES
          value_tab              = lt_table
       FIELD_TAB              =
          return_tab             = lt_return
       DYNPFLD_MAPPING        =
      EXCEPTIONS
        PARAMETER_ERROR        = 1
        NO_VALUES_FOUND        = 2
        OTHERS                 = 3
      IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
      READ TABLE lt_return INDEX 1.
      MOVE lt_return-fieldval TO p_dappl.
    With Regards,
    Sumodh.P
    Edited by: Sumodh P on Apr 21, 2010 8:06 AM

  • How can I create software start and stop trigger in LabView using 6023E series DAQ card? I don't want to use the external trigger.

    I am using 6023E DAQ card to collect the signals, such as AE, Force, Torque from the machine. I want to collect only some part of signal for example between start triger and stop trigger. I'd like to know how I can creat those triggers in LabView from one of the channels that I am acquiring at the same time. I found one or two library file that is only for start trigger. I know that this is availabe in some of DIAdem functions. Please let me know if you have done some example for this requirement.

    If you are wanting to create a software trigger based on an analog input voltage in LabVIEW, there are several options. One suggestion would be to compare the voltage values from one input channel to a number within a loop. If the input voltage crosses that threshold (is greater than the number), have a case statement that will acquire data from the other channels. This would simulate a software start trigger in LabVIEW.

  • How can I create a rollover drop down menu from a link in Dreamweaver CS5?

    Hello all,  I am working on a portfolio website and I was just wanting to know if there is any way that I can create a drop down menu from a text link that cascades once the cursor has made contact with the link. I would like to have it in my navigation bar where the Portfolio link is. Basically, my navigation bar looks like this : Home | Resume | Portfolio | Contact. I only want three items on the drop down menu beneath the portfolio link: Traditional Art, Photography, Graphic Design. I would really appreciate any help I can get! Thanks!

    Have a look at what Nancy does http://alt-web.com/DEMOS/CSS-Horiz-menu-2.shtml

Maybe you are looking for

  • Font problem (font doesn't work in preview?)

    I've been working on a book with the arial narrow fonts (regular, italic, bold , bold italic). I've tried using the open type and the true type version of the font but always end up with one of the fonts not working when I preview the book on my ipad

  • Problem running form in 9iDevSuite

    Hi all i have 8i database and 9i Dev suite installed. I am trying to run my form from within 9iForm Builder and got error "HTTP Listener is not listening 0n 8888 port".(even though i have started OC4J) I couldn't found even HTTP listener if it is ins

  • IOS7 iTunes crashes / won't launch

    I went to browse the iTunes Store today. When I launched the app I saw a brief glimpse of the search tab in the app followed by the entire screen being occupied by a stretched-to-fit iTunes logo. Then crash! Launched again; same thing - crash! iTunes

  • Executing reports offline

    Hi, Is there anyway for us to generate an oracle report offline without using the report builder in PDF format? I tried to generate it as PDF using report builder but the report seems to be too large for that - that the report builder just closes its

  • I am unable to connect to websites using Firefox. I can connect to websites with Internet Explorer. Please advsie.

    I am unable to connect to websites using Firefox. I can connect to websites with Internet Explorer. Please advise. Thank you.