IMFSourceReader : is it really possible to accurately seek and read samples from an MP3 source ?

When decoding PCM data from an MP3 from position 0 and in one go there is obviously no problem. However, when I try to seek to a certain position for reading some samples, no matter what I do, the seeking is never accurate and consequently, the produced
output is incorrect.
(My test is quite simple, i do read blocks of 44100 samples until EOF (and do seek between each call); then i do compare the produced output with the original file using an audio editor and a phase scope. The first block is always correct, but over time
it drifts nearly about 20000 samples and it is clearly audible as pseudo delay effect.)
According the
docs, you have to account for that and that's what I did, for instance when seeking to some position, the exact position in buffer starts at offset 576. But when I do check with an audio editor, the returned data is 252 samples later ...
I've also checked my formulas that converts between REFERENCE_TIME and samples but they don't seem to be the problem:
int64 ReferenceTimeToSamples(REFERENCE_TIME time)
return round((double)GetSampleRate() / 10000000 * time);
REFERENCE_TIME SamplesToReferenceTimeD(double samples, double sampleRate)
return (REFERENCE_TIME)round((double)samples / sampleRate * 10000000);
Question :
Is exact sample retrieval possible when randomly seeking within an MP3 file ? If yes, then what is the approach ?
Thank you !

What you are experiencing is expected because an mp3 Layer III frame can be spread over several frames. For a certain bitrate/sampling_rate you can calculate the frame length.
It is either ‘n’, or ‘n+1’, which depends on the padding bit. But, that doesn’t mean that all compressed data will fit in frame_size bytes. Also, sometimes compressed data takes less than frame_size bytes. Therefore, when frame needs to be “overfilled”,
the extra data will be contained within next frame that can accept it. You can find more about this if you search for “bit reservoir”.
So, what happens when you seek is that you are decoding a frame that is missing some data required to be decoded properly because that data is located in one or more previous
frames.

Similar Messages

  • I have a friend who I was helping out with his iPhone. He has since lost it. I believe I backed it up to my machine but have no idea where to find it. Is it possible to find it and read the back-up file without the original device being connected?

    I have a friend who I was helping out with his iPhone. He has since lost it. I believe I backed it up to my machine but have no idea where to find it. Is it possible to find it and read the back-up file without the original device being connected?

    If he gets another device - you should be able to restore it from your computer to the point where you backed it up
    Otherwise that file cannot be read

  • Is it possible to download and read books from Waterstones in the ebook format on iPad. If so how? Is there any need to download an app? Thanks

    Is it possible to download and read books from Waterstones in the ebook format on iPad. If so how? Is there any need to download an app? Thanks

    People who sell ebooks normally tell you what you need to read them, e.g.
    http://www.waterstones.com/waterstonesweb/pages/help-ebook-faqs/200001173/

  • What integration is really possible with Corba clients and servers

    I find the RMI/IIOP sections of the docs a little confusing or maybe just lacking a few "clear statements".
    I have a few specific questions:
    1. What version of CORBA/IIOP do you support? Fully support?
    2. Do you have your own ORB, or rely on the JDK? or other?
    3. Can I use WLS to originate a call out to a CORBA server? without running my own ORB inside the WLS process?
    Simple, concise answers will be appreciated by the CORBA challenged people like myself. If these questions are addressed in the docs, please point me there as well.
    Thanks, Craig

    Don Ferguson wrote:
    Craig Macha wrote:
    I was hoping to get some answers from BEA through the newsgroups. If the questions aren't appropriate for this forum, please let me know. If you are looking for anwsers, let me know. If the questions aren't clear let me know. Please, just don't ignore them though. Thanks, CraigThe questions are clear enough, it's just that our RMI/IIOP expert has been
    extremely busy, and hasn't been monitoring the group. I'll do my best to
    answer them, but hopefully you'll get a more authoritative answer soon.Sorry... my fumble...
    >
    >
    1. What version of CORBA/IIOP do you support? Fully support?
    We require IIOP 2.3, because we need OBV.We support communication with RMI objects over IIOP; we support iiop version 1.0. Generally, this takes CORBA 2.3 on the client.
    >
    >
    2. Do you have your own ORB, or rely on the JDK? or other?
    We do not have our own ORB. We rely (to some degree) on the IIOP
    implementation present in the 1.3 JDK.This correct: we do not use an ORB; we use the JDK's implementation of OBV marshaling streams, but nothing else.
    >
    >
    3. Can I use WLS to originate a call out to a CORBA server? without running
    my own
    ORB inside the WLS process?Yes. In general, all calls (in or out) must conform to the RMI-IIOP restrictions, namely, the interfaces must be defined as RMI interfaces. In addition, WLS stubs must be available on the WLS side when a call is initiated. Name resolution is performed either by binding the corba server in the WLS
    JNDI tree or by looking up the corba server in a COS Naming server, although the former avoids creating an orb in the WLS instance.
    >
    >
    I believe so. I don't know what the caveats are, if any.
    -Don

  • Is it possible to animate videos and images coming from web service.

    i am calling a webservice. from that i am getting response. in that i have images and videos. i took those in an array. Now i need to animate those array values. just like animating images. So please tell me is it possible to animate videos are not. if yes how?

    Then, if it's not self-powered and you don't have a USB hub to power it, it's impossible.
    If you DO have a hub, give it a try. If the HDD is formatted in FAT32 or other, iOS-friendly formats (NOT NTFS!), you may be able to import videos / pics from it so that you can access them as imported media files.

  • Is possible compile .asm code to hex code?? and read&program from lb pic16f84 serial port??

    Hi,
    I would like to use my aplication, i use a pic 16f84, in my vi application i modify the asm code, and save it. LAter i need to use mplab to compile to hex and use icprog to pass to the pic by serial port...
    Is possible do all on labview???.
    Or maybe call the mplab directly to open and convert to hex file, and later call the icprog to program the pic.. without use this programs. Directly with commands do it and close the programs...
    I hope any help..!
    Regards, Fonsi.

    Fonsi,
    You certainly could write an assembler for the pic code in LV. I wrote an assembler for the old 6502 processor in LV4. The project got cancelled before everything was finished, but the concept is valid. It is a lot of work, parsing strings and tracking all the addressing modes, etc.
    Whether it is worth the trouble as opposed to using the existing tools is something you will have to decide.
    If the other software can be called from a command line, the system Exe.VI might be useful.
    Lynn

  • Possible to limit dimensions and measures when creating presentations?

    We are trying to use OLAP/BI Beans to add BI functionality to our next-generation data warehouse application. This application has its own security framework, with the ability to define permissions/privileges for objects. We need to integrate BI Beans/OLAP with this security framework.
    One of the things we need to do is control which OLAP objects (like dimensions and measures) are available to a given user in the Items tab when creating a presentation. For example, user A might see dimensions Alpha, Bravo and measure Charlie, while user B might see dimensions Delta, Echo and measure Foxtrot.
    We need to be able to apply these dimension/measure restrictions without using different Oracle users, with each having access only to their own OLAP objects. Our data warehousing application does not use Oracle and Oracle users to control security; it has its own internal frameworks for privileges/permissions. We therefore need to find a way to restrict access to OLAP objects in some programmatic way.
    Here's an example of how this might work:
    - I am a clinical analyst. I sign on to the data warehouse application. The data warehouse knows that as a clinical analyst, I have access to a certain list of objects and functionality across the application. One of the apps I have privilege to is the BI Bean Presentation Creation Application, so I click the menu to bring this up. I can now create BI presentations, but since I am a clinical analyst my list of available dimensions and measures do not contain any of the G/L, payroll or other financial OLAP objects.
    - If I signed onto the data warehousing application as a different user, one that has a financial analyst role, I might see a different set of OLAP objects when I run the presentation application application.
    So what we need is some API way to specify which dimensions and measures are available to a given user when they launch the presentation wizard. I've been digging through the BI Beans help and javadoc and have found a few things, but they aren't what I need.
    Here's what I found:
    - setItemSearchPath: this allows you to specify which folders are to be displayed. We want control at the OLAP object level, not at the folder level, so this doesn't work for us
    - setVisibleDimensions: this controls which dimensions are available in the Dimensions tab, not which dimensions can be selected in the Items tab. Doesn't work for us
    - setDimensionContext/setMeasureContext: These might work for us but I haven't been able to get them to retrieve anything yet. It also seems to me that these might set which dimensions/members are initially selected in the Items tab, not the list of dims/measures that are available for selection.
    Any assistance on this matter would be greatly appreciated.
    s.l.

    Reply from one of our developers:
    The get/setMeasureContext and get/setDimensionContext methods are currently only used by the Thick CalcBuilder (in a few limited scenarios) and cannot be used "to scope the dimensions and measures listed in Query and Calc builder based on user access rights".
    The scoping of dimensions and measures based on user access rights should be performed at the MetadataManager/Database level.
    This may change going forward as the real issue here is the static nature of the metadata and a general issue with the GRANT option within the database. So from the database perspective it is not possible to grant select priviledges on a single column of a table.
    The metadata issue is more complex as the OLAP API reads the metadata only once on startup of a session. The list of available measures is based on the GRANT priviledge, so for relational OLAP this limits the data scoping capabilities. In 10g, the metadata for AW OLAP becomes more dynamic and contained and read directly from the AW. Therefore, with an AW OLAP implementation with 10g it could be possible to scope boht dimensions and measures quickly and easily.
    Hope this helps
    Business Intelligence Beans Product Management Team
    Oracle Corporation

  • Possible to create detailed and Summary in same crystal report?

    Hello
    I have worked with cyrstal reports back in 2001. Now I am back to creation of reports. I vaguely remember I was able to create summary and detailed reports from one crystal report file. I don't remember if I was using two different stored procedures or not. Can anybody explain if it is possible to create summary and detailed reports from one crystal report file and with one stored procedure. I am guessing somehow I should be able to control behaviour of report - ie. say if user selects detailed report- report will show all records and if user selects summary view then report will show summarized view of same data.
    If its possible how do you do it? Can you explain.
    Thanks a lot.

    There are a couple of techniques with drilling and sub-reports, but what I do most frequently is create a Detail/Summary  parameter for the user to select, and then have a formula that references this parameter to either hide or display a Detail section of the report sepending on the option the user chooses.  My experience is that most users can relate to this approach better, where as driling and sub-reports can sometimes cause confusion for them.

  • 5MP app for IPAD2 CAM is it really possible??

    I saw an app in the Itunes Store making me able to use the Camera for 5MP shots. Is this really possible? Cause I thought the cam only had 0,79 MP.
    Thanks!

    Then I'm scammed: http://itunes.apple.com/us/app/professional-camera-for-ipad/id435662618?mt=8 it sais nothing about the Iphone. Just about makeing 5MP photo's with the IPAD2.....

  • Ajax without JavaScript - Is it really possible?

    I read your article Ajax Without J . Wondering Is it really possible.
    How about if i have following situations
    1) I wanna display Alert Message whenever users click on Delete button i.e. confirmDelete function using JavaScript
    2)Clearing the form fields on click of Reset button
    This can be easily accomplished using JavaScript functions. Do we have something similar in Ajax4Jsf
    Also is it possible to conditionally render buttons using Ajax4Jsf. For example whenever user selects "New" from h:selectOneMenu i dont wanna display Delete button. I am using Ajax4Jsf here with reRender attribute on h:commandButton it doesnt work
    Regards
    Bansi

    duplicate for http://forum.exadel.com/viewtopic.php?t=5943

  • HT1689 is it really possible to spy remotely on iPhone?

    is it really possible to spy remotely on iPhone? Means is it possible for someone who uses the same mobile network to spy on my iPhone 4?

    myblackipadmini wrote:
    when I reset my iPhone (data & settings) that means am eliminating any possibility for any spying possibility (hidden software)?
    If when you say "reset" you really mean a Restore (a "reset" in iPhone terminology is more-or-less like rebooting your computer), then a Restore will erase any data and settings. But the only way anyone can install hidden software on your iPhone is again if it's jailbroken, and with jailbreaks a Restore may not remove everything. That's one reason why jailbreaks are strongly discouraged. If your iPhone is not jailbroken, then it can't be spied upon by any means accessible to normal people.
    Regards.

  • Using a fake semi-transparency - what's really possible?

    Hi,
      I'm just now moving into DW CS4 (from cs3) and I'm on an intel iMac. I'm trying to make a table background that is semi-transparent while KEEPING text and photos 100% opaque. I'm already familiar with this kind of code: (just improvising here):
    .tableMain {
    background: transparent;
    filter=alpha(opacity=50);
    opacity=.5
    But this makes EVERYTHING semi-transparent - content and all. I'd love to know if it is possible to keep the content fully in view.
    I've tried making a semi-transparent GIF or PNG background in Photoshop CS4 and using it for the table background, but that doesn't seem to work.
    I did discover this (perhaps unique to my site) solution for a fake semi-transparency: Since I've got a gradient background on my site (see www.frankbright.com/History.htm ), I took a 'Screen Snapshot' of the background, from the bottom of the navigation to as far down as I could go. Then I used PS CS4 to expand the canvas and color down to cover my long pages. (See Jazz Links)
    Then I used PS levels to darken the snapshot very slightly, so as to intimate a gray semi-transparent effect. Then I simply used that snapshot as the table background.
    This looks better on the long, clearer pages that have only text content. With the index3 home page, however,  you don't sense the semi-transparent effect I'm going for as much.
    I've also noticed the 'Extensions' area of the CSS interface in DW - does this have anything to do with what I'm trying to do?
    Anyways, I'm open to ideas, if anyone could suggest any.
    Many Thanks, Frank B.

    Hi
    You did not say what the problem was.
    others viewing this thread. please read -
    As for the colors of the background gradient using IEFilters, (for those who did not know on the forum, the IEFilter for background gradient was available since IE4.5, circa 1996, and all filters since IE5, circa 1998) you will need to adjust these as required. Luckily enough most background gradients go from one color to white or a lighter color of the starting color.
    For FF and Safari see - http://hacks.mozilla.org/2009/11/css-gradients-firefox-36/, http://webkit.org/blog/175/introducing-css-gradients/.
    Google Chrome uses the webkit declaration, but unfortunately Opera does not support the feature, (use a standard background color at the beginning of the declaration) and FF only from version 3.6. But with the upgrading for FF users normally being 70+% within 6 months, this does mean that 85% of users will support the background gradient.
    PZ
    Edit: If you are using a css reset then it may be worth placing the position: relative; statement in this, as these normally include all the elements from H1 to pre.
    Message was edited by: pziecina

  • Really stupid that you can't drag and drop photos from Finder into Events

    There is no way in iPhoto to do what I want and need to to, to wit, drag and drop photos from the Finder into existing iPhoto Events.
    It really doesn't make sense that you can't do this. First of all, calling these groups Events to begin with is not smart; in my case, a group of photos in a folder on the Finder is rarely all from one photo session or so-called "event"--- instead of Events they should just be called Groups or something, and you should be able to drop individual photos into them. I have thousands of family photos that were accumulated on my hard drives over the years, some scanned in from film negatives, slides, or prints, others from digital cameras, and when I have changed Macs and hard drives over the years, every time a folder of photos was moved from an old hard drive to a new one, or regrouped into various folders, the photos seem to have acquired new dates of origin, etc.
    Anyway, what I mean is, if Events are all time based, then somebody like me who has thousands of photos with all sorts of dates of origin, mostly unrelated to the date that the photo was actually shot, is screwed. I have old photos with new dates of origin and other mismatches between photos and the dates when they were actually shot or scanned.
    My gripe is, again, that when I find photos on my hard drives that belong in certain iPhoto Events that have already been created, I cannot just drag these photos from the Finder and drop them into the Events they belong in. Instead, the stupid program creates a new Event from each photo I try to drop into an existing Event. That means I have to chase these new photos all over the place inside of iPhoto, trying to figure out where each new photo (now called an "Event") has ended up, so that I can drag and merge it into the Event I wanted it to go into in the first place. A real pain in the neck. It simply takes too long to do this for each photo added.
    What this means is that iPhoto is not going to be a practical way to organize for a person like me until Apple makes it possible to simply drop any photo from the Finder into an existing Event. There should be an option to allow that. I'm really surprised there is not one. <edited out by Hosts>
    Tom

    Tom, iPhoto will not overwrite photos with the same name. I have plenty of photos with the same name in the same event. Each photo most likely has an internal handler that manages the photo, and not just the name of the file.
    I agree with you that this is sub-optimal, and (IMO) I think what happened is iPhoto 6 had rolls, and they came up with a really cool interface for mousing over those rolls, and decided it was more consumer friendly (and because film is a thing of the past) to call them events, rather than rolls. I think it was worth a shot, but they just slightly missed.
    Right now in iPhoto08, any serious organization is done in folders and albums. Personally, I think they need to combine the two concepts -- the great "mouse over" view of events with the organization abilities of folders and albums. I'd like an albums view where I can mouse over the albums. Actually, Aperture 2's interface for organization is more functional than iPhoto, so I am hoping some of that benefit creeps into the next iPhoto release.
    What I do is: I use events for high level grouping (like Winter 2007) and I organize folders and albums to break that down further ("trip to Montreal" "Christmas" etc.). But I do it backwards. I fill albums first, then I organize events.
    When I drag in pictures to iPhoto, first I make the target album in iPhoto that I want to populate, then I drag the photo directly to that album (not to events). iPhoto automatically puts the photo into the album I created and also into a new event. Later, I go into events, right-click on this new event to "open event in separate window" then I move around the events view, to drop in the pictures from the "import" event I just created. If I move all the pictures into other events, iPhoto automatically deletes the event I just emptied. You could skip the event organization all together if you wanted to, but you'd lose the cool mouse-over feature, which can be handy.
    One nice thing about having events AND albums is you can have the photo just once in iPhoto, in an event, but then have the photo appear in as many albums as you want (as well as projects and web galleries) all while only having one photo on your hard drive. So, there are benefits to events, but I think iPhoto is missing just a couple little bits of organizational ability to make it perfect. (and yes, I've submitted this all to Apple as feature requests)
    Just in case you don't know -- events don't have any hierarchy. That is, you can't nest events. But you can have folders with subfolders, and any folder can contain albums. Albums cannot have sub-albums, and folders don't hold photos. Only albums hold photos, and folders (or sub-folders) hold albums. Try create some folders and albums and you'll get the hang of it. One other issue that Apple needs to address. When you create a new folder or album, it doesn't put it right where you want it, but rather puts it at the bottom of the list, so you have to drag it up to where you want it. Try it out, and you'll see what I mean, then submit it as a feature request to improve that.
    I agree it's not perfect, but it's not too bad once you get used to it. And the benefits of working with the rest of the features of iPhoto is worth it. I'm just really hoping they do a few tweaks on the next release. They are near greatness here. They could just use a little nudge on the last bits. (in my opinion of course. Others may disagree, but I've talked to enough people who have the same issues you are having to know we are not alone on this).

  • Hi. I use Adobe Acrobat XI pro to make a PDF ebook embedded with audio. It works really well on my computer-I can read the book and hear the auto play mp3. The problem is, when I send it to my customers, they have difficulty hearing the audio. A few of th

    Hi. I use Adobe Acrobat XI pro to make a PDF ebook embedded with audio. It works really well on my computer-I can read the book and hear the auto play mp3. The problem is, when I send it to my customers, they have difficulty hearing the audio. A few of them say they have Flash player on their PC and somehow they still can't hear, some say their Google Chrome browser tells them they've already got one flash player while they try to download one. For me, I had to download two versions of Flash player to be able to access to the audio. I don't know what the problem is, is it because it's the latest version of Adobe Acrobat XI pro that people with older version of Adobe reader or flash player can't open it properly? Or is it something else? How can I make sure every customer with different system can access to my books? Hope to hear from you ASAP! Thank you very much.

    And how are the customers accessing the PDFs?
    What devices are they using?
    What program or apps with versions are they using?
    I this age of other then PDF eBooks formats and reader program and apss for computers and mobile devices for these formats I would look at creating the books in one or more of the eBook formats.
    Google Chrome and FireFox both have their own version of a PDF reader plug-in and they are well known to be less capable than Adobe Reader. It is possible to configure these products to use Adobe Reader.

  • If Firefox 20 is in Private Browsing mode then a possible persona is disabled and the default theme is used - oh god, no - what can I do to keep both?

    Cor-el answered on the 4.4.13: " If Firefox 20 is in Private Browsing mode then a possible persona is disabled and the default theme is used. So you will have to make a choice."
    Can I go back to an older version of FF? I really do not want to choose. Will that problem be fixed in FF 21? I really love Firefox, it has always been my favorite browser - but giving up the Personas will be hard and I don't understand why I have to...
    How do I reinstall an older version of FF? Is there another solution?

    Remember to use the per window Private Browsing when you are doing banking or other confidential / financial work.
    One option is now
    * '''Firefox Button -> New Private Browsing Window'''
    * (Linux / xp File -> New Private Browsing Window)
    * see [[Private Browsing - Browse the web without saving information about the sites you visit]]
    You may even benefit from saving your History.It improves the functionality of the location bar / ''awesome-bar ''
    *[[Awesome Bar - Find your bookmarks, history and tabs when you type in the address bar]]

Maybe you are looking for