Audio corruption on the device

I am working on an mp3 streaming app with CBR data. Using CBR (Constant Bitrate) makes setup of the audio buffers really easy, vs. VBR that requires setting up packet size data for each packet. Well, if I pretend that my streams are VBR, things generally "work" although the code is more complicated than it needs to be. If I use the CBR approach (read X bytes, shove X bytes to AudioQueueEnqueueBuffer(, magically play music..) it works great on the simulator. However, it fails on the device. I get audio corruption, little glitches ever second or two, typical of trying to play incomplete mp3 packets.
Has anyone else observed this and know if this is a known issue?

In your Code a important part is to set up the AudioStreamBasicDescription structure.
Channels: Stereo = 2 or Mono = 1.
Format: MP3 [There is format setting that will set this value something like AudioStreamFormat ... ]
Sample Rate: What ever your sample rate is. If its wrong the mp3 will sound chipmunky
When reading the file from disk use AudioFileReadPackets to get the amount of packets. For the buffersize you'll need there is a function AudioQueueGetProperty which once the AudioQueue has been opened you can get the maximum size for the buffer.
Mike.

Similar Messages

  • Right now i m using ios 5.1.1 and i want to backup up my data to the iphone and my last backup was on ios 4.3.5 but when i restore backup it shows error saying that itunes could not restore the iphone because the backup was corrupt or the device is not...

    How to backup an ios 4.3.5 backup on new ios 5.1.1

    Make sure that you deleted and reinstalled iTunes exactly the way described in this support document http://support.apple.com/kb/HT1923

  • I just purchased a classic and some how deleated the audio book file from the library and the device section of iTunes, how to restore

    I accidently deleted the file folder audio books from the library and from teh device section in iTunes how to replace

    Edit > Preferences > General tab, tick Books. Audiobooks are synced from the Books tab of the device.
    tt2

  • Sample rate off the audio input and out devices do not match - what to do?

    This is fundamental, I know, but nevertheless I can't find my way around it. I get this error message when trying to recor:
    Sample rate off the audio input and out devices do not match
    and am asked to do this:
    Use the appropriate operating system or audio device control panel to adjust the sample rates of the input and output devices to use the same settingt.
    I have defined the sample rate to 44.1/16 bit in accordance with my inbuild soundcardt.
    I am trying to record from LineIn.
    When running on a M-Audio sound card I don't face any problems.
    HP 8560W, sound card IDT/High definition audio Codec
    Any suggestions?
    Knud
    Copenhagen

    You're sure you have set BOTH the input and output settings to 44.1 16 bit?
    Which version of Windows are you running?  There are a number of posts on this forum about how to fully access both the Windows Mixer and the Mixer for your soundcard.  Especially, you need to ensure that all "Windows Sounds" are turned OFF.

  • How can I get my audio input and output devices back? I have no sound and cannot see any of the devices in Audio MIDI Setup..??

    Hi, I tried to set up a new output audio device on my mac that would have multiple outputs (iBox Twist speaker and my internal speaker) but when I went to click onto one of the iBox Twist (there were 2 options available: iBox Twist and iBox Twist Stereo), Audio MIDI Setup crashed and when I finally got that back open, I found that there were no audio input or output devices to be found. My sound is working, as when I turn on my iMac, the starting sound still plays, however the volume control in the menu bar is no longer a black colour, but grey and when I try to change the sound on my keyboard it does not change. This already happened to me once, and after 3 hours I managed to fix it very simply (switching off Mac, unplugging power cord, leaving for 15 seconds, plug power cord back in and switch Mac back on, holding Alt, Cmd, P and R keys until you hear the Starting Up sound twice) however this same technique that fixed it once before is not working this time and I am still stuck without sound. I have tried Repair Permissions, rebooting in Safe Mode, Hardware Test and checking for Software Updates. Has anyone else had this problem and managed to fix it?
    Thanks in advance for any help anyone can give me!

    In case anyone has had the same problem as me, I have just managed to fix this by doing the following:
    Switch off Mac
    Switch back on in Safe Mode (Hit power button, then hold Shift key until a loading bar appears at the bottom of the screen).
    Switch off Mac again
    Remove power cord and wait 15 seconds
    Plug power cord back in and hold down the keys alt, cmd, p, r all at the same time until you hear Starting chime for a second time and hopefully your audio will back.

  • I don't own an Apple device, but I have purchased an audio album from the iTunes store. How can I play this on my android phone, as I am unable to burn the album to mp3 format? Can I obtain a refund if this is not possible? Thanks

    I don't own an Apple device, but I have purchased an audio album from the iTunes store. How can I play this on my android phone, as I am unable to burn the album to mp3 format? Can I obtain a refund if this is not possible? Thanks
    p.s. I am not knowledgeable of Apple/iTunes etc, I was under the impression that if I purchased an album then I can use my purchase on a non-Apple device

    mickyja wrote:
    I don't own an Apple device, but I have purchased an audio album from the iTunes store. How can I play this on my android phone, as I am unable to burn the album to mp3 format? Can I obtain a refund if this is not possible? Thanks
    p.s. I am not knowledgeable of Apple/iTunes etc, I was under the impression that if I purchased an album then I can use my purchase on a non-Apple device
    Micky,
    The iTunes Store sells songs in AAC format.  Most Android phones can play AACs.  Just sync them to your phone per the instructions with the phone.
    If by any chance your phone does require MP3 format, you can use iTunes to convert the files, per this guide: 
    iTunes: How to convert a song to a different file format - Apple Support
    (This conversion does not require burning.)
    For future reference, note that the iTunes Store is really optimized for people using Apple devices.  You might find it more convenient to buy music in Mp3 format from Amazon Digital Music or Google Play Music.

  • I want to be able to use airplay to stream audio to another iOS device, and then use that audio stream to be used when recording video instead of the built in microphone / microphone input. Is this possible?

    I want to be able to use airplay to stream audio to another iOS device, and then use that audio stream to be used when recording video instead of the built in microphone / microphone input. Is this possible?

    A third-party app probably cannot obtain a stream from another app. To the best of my knowledge, such a capability is not provided in the software development kit, apps being "sandboxed" from each other and so allowed to communicate only in very specific and limited ways.
    I'm not completely sure what you mean by "limitations on video capture". An iPhone, to the best of my knowledge, can natively record video only through it's built-in camera, and audio while doing video recording only through the built-in microphone or mic/headphone jack. There might be a video recording app that would allow audio input from an external device connected to the dock connector, but I'm not sure.
    Regards.

  • NO Audio output Device is installed as well as NO sound, video, or game tab in the device manager

     Here is the issue I had with with my Compaq F700 series laptop. The sound was working one day and then not working the next. Over the volume icon there was a big red X and the warning that  No Audio output Device is installed. I also found that there no longer was the sound, video, game tab in the device manager. It had gone missing.    
    I couldn't use most of the fixes as they require having the sound, video, game tab available and this tab was, as I said missing. I tried reinstalling the sound drivers from the manufacturer’s website as well as using the driver re-install, but at each attempt it would fail as a result of not having any audio devices installed on the computer.    
    I tried doing the system restore and rolling it back but the problem didn't get resolved. What eventually worked was restoring the system to a MUCH earlier date, like a month prior to the problem. When the restore finished the sound was still not fixed. HOWEVER, the computer OS (WINDOWS 7) needed to re-install a bunch of updates and after the updates were installed, everything was working. I suspect that the original issue was a bad update (the updates didn't install correctly) and that by rolling the system back to a time prior to the bad updates and then re-installing the update was the fix.
    With that said, if the restore option doesn’t work or can’t be done I would try looking through the add/remove programs in the control panel and uninstall the most recent system updates, then restart computer and let the updates re-install.  
    Good Luck

    Only option that I see in the BIOS is under Security.  Audio Device: Hidden or Available. It was set to available and I left it at that. Still no audio.
    Really? Nothing? This computer is one year old. Absolutely no reason for this to be happening. What a joke.

  • My ipod classic will dowload any music from itunes it says corrupt, and it will not restore the device

    My ipod classic will not dowload any music from itunes it says corrupt, and it will not restore the device

    What happens when you try to restore the device to factory settings?  Any error messages?  If so, what is the exact wording of the error message(s)?
    B-rock

  • Resolution Steps:  iPhone, iPad or iPod Touch library corrupted and showing ghost entries which will not play or music that is on the device in iTunes but inaccessible.

    Issue:  iOS Music application either has items listed in the library that will not play; or has an empty library but iTunes reports that music is present on the device and taking up space; or a combination of these issues coupled with the inability to resolve the problem through the standard resolution steps of disabling music syncing to remove all music and then re-enabling or by enabling "manually manage library" and removing the items.
    Additionally, attempting to restore from a back-up does not resolve the issue and the default response from the Apple Support Community is to factory restore the device and treat as new device, resulting in loss of all settings and basically starting from scratch.
    Cause of issue:  Corrupted iOS device iTunes library (MediaLibrary.sqlitedb).  This database stores the iTunes Media records and related information such as playcount, lyrics etc.  It does not store information and settings regarding iOS Applications as far as I am aware so this should be safe.
    Resolution Steps:
    Perform a back-up to your local computer rather than iCloud if practical.  This will be quicker in the event of issues.
    Download a iOS device manager such as Phone View (http://www.ecamm.com/mac/phoneview/) which will allow you to directly access the file structure of the device.  (This will NOT require an illegal jailbreak to be performed!)
    Enable the Advanced View mode so the entire disk structure is accessible.
    Browse to the following file:  iTunes_Control/iTunes/MediaLibrary.sqlitedb
    Rename MediaLibrary.sqlitedb to MediaLibrary.sqlitedb-backup or similar
    Hold down POWER and HOME on your iOS device until the Apple logo appears.  Release both buttons.
    When device has rebooted, connect to iTunes and synchronise it.
    iTunes will detect that the Media Library on the device is missing and recreate it based on the items that it has listed in the iTunes synchronisation record for the device.

    michaelfromstockton on tees wrote:
    I've found an easier way, just go to settings>general>usage>music. Then swipe it and press delete, i think this deletes the database described above, then re-sync, this worked for me anyway. Good luck, you need it with Apple software.
    I don't have a large library of music on my iPhone 4s since I've only had it since Oct 2012, but since the update to iTunes 11 in early December, my album artwork has been all messed up.  Everytime I would try to add new music, it would assign the wrong album artwork to anything new coming in.  And in addition to that, it would also mess up album artwork of music already on my phone.  Everything looked correct in iTunes, but on my phone, not so much.  After trying to unsynch, then synching again, my frustration level was at an all-time high. This problem seems to be everywhere online, but no concrete solution for everyone. 
    I finally came across your simple solution (at least for me because of my small inventory of music) of just deleting all the music through the settings, and then re-synching to add back my music.  Now all of the album artwork is correct again.  I'm almost afraid to add new music for fear the artwork will get mixed up all over again! I still think my issue is somehow connected to the iTunes 11 update because up until then I had no issues whatsoever. Anyway, thanks for an easy solution that worked for me.

  • Hi I shoot on a canon 5d mk11 and I record my audio on an external device yet when I open up my footage in final cut pro x I can't find my external audio files only the ones attached to the clip which are off the camera mic

    I shoot on a canon 5d mk11 and I record my audio on an external device yet when I open up my footage in final cut pro x I can't find my external audio files only the ones attached to the clip which are off the camera mic

    What device?
    What format?
    How are you importing it?
    Can you find the external audio with Finder?
    Where is your destination file when you import it?
    Andy

  • Why do I get this error when trying to use my bluetooth headset as a listening device? There was an error connecting to your audio device. Make sure it is turned on and in range. The audio portion of the program you were using may have to be restarted.

    Why do I get this error when trying to use my bluetooth headset as a listening device? There was an error connecting to your audio device. Make sure it is turned on and in range. The audio portion of the program you were using may have to be restarted.

    I may have already resolved this issue buy removing the device from my computer and re-pairing it. It is currently working just fine.

  • Streaming audio-video on the mobile device

    Please, I must do the streaming audio-video on the mobile device using a server standard.
    I must to program the application for the server using j2se:in this case how i can send the file audio/video?This file have specifies classes?
    For the client i must using the j2me:in this case how can receive the file audio and creating the player?
    Thanks.

    Hi, please help,
    I have problem in this area also,
    am intending to stream audio and video data to mobile phone using j2me for my bs project.,
    is that true, midlets can only 'plays back' one file at time specified by url?
    I want to store many files in database( e.g ms access), and call them to midlets, to make some how interactive and real,because i have tomcat server installed in my pc.
    is this possible?
    How can i call file stored beyond path of WTK ?
    can i store audio/ video file in ms- access?
    Please, please help !
    thanks in advance.
    Message was edited by:
    nbkamani

  • Windows cannot load the device driver for this hardware. The driver may be corrupted or missing.

    I'm having the error "Windows cannot load the device driver for this hardware. The driver may be corrupted or missing. (Code 39)" and I can't read/write CDs/DVDs. When I try to update the driver  I have the message that it is already up to date.
    I can't find the driver to dowload and try to fix the problem. Where can I download it or solve somehow my problem?

    Hi juigarashi,
    Microsofts automated troubleshooting service on the link below may help
    CD/DVD Repair
    Hope it works for you.
    ****Click the White thumb to say thanks****
    ****Please mark Accept As Solution if it solves your problem****
    ****I don't work for HP****
    Microsoft MVP - Windows Experience

  • Can editors using Mountain Lion check the Device Input Gain slider in the Record Audio tool is working?

    Please see this thread for full details.
    https://discussions.apple.com/message/21134725#21134725
    It appears that for some people, upgrading to Mountain Lion 10.8.2 kills the Device Input Gain slider functionality in the Record Audio tool.
    Could you post your findings?

    Thanks Luis, it looks as though it is quite widespread, if not universal.
    As you can see in the link above, booting back into Snow Leopard 10.6.8 completely restores the functionality for me, so it looks as though it's ML that kills it.
    I've sent a feedback to FCP X.

Maybe you are looking for

  • Problem with RZL_READ_DIR_LOCAL

    Hi Experts, The Function module RZL_READ_DIR_LOCAL is reading the APPLICATION server AL11 directory path and list all the folders & file inside that directory into an internal table FILE_TBL. Since the size of the field FILE_TBL-NAME is 32 chars . So

  • PI 7.1(dual stack) and PI 7.31(Single stack) -

    Friends, I have a proxy to proxy scenario - Proxy --> PI --> Proxy We have two servers PI 7.1(dual stack) and PI 7.31(Single stack) i did the development in ESR and my ESR is pointing to PI 7.1, when i execute the scenario i receive one error message

  • Switch between input languages

    Hi all, Im trying to switch between input languages on Windows TS/Win 7 by pressing Left ALT+Shift but unfortunately it doesnt work for me. by using a key sequence (ALT+Shift) on Windows side I do see the changes on the languages bar, but cant type a

  • Strange behavior when closing laptop

    Hello all, I'm posting this in a new thread because I don't believe it fits with the other current threads. An odd thing happens every now and then when I close my laptop to put it to sleep. I lift the lid again and a strange "veil" (darkening) casca

  • Initialize array from a constant string

    I generated the coefficients for a FIR filter in Mathscript (250 taps).  I dumped the values to a data file and then "load"ed them into a Mathscript box inside my vi.  This worked well until I created an executable version of my program (no Mathscrip