Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8421363
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T03:07:55+00:00 2026-06-10T03:07:55+00:00

I was working on streaming audio live using the Audio Streaming Services library (based

  • 0

I was working on streaming audio live using the Audio Streaming Services library (based on Matt Ghallager’s tutorial) and I kept on crashing at this part:

err = AudioQueueStart(audioQueue, NULL);
if (err)
{
    [self failWithErrorCode:AS_AUDIO_QUEUE_START_FAILED];
    return;
}

the error code is: kAudioDeviceUnsupportedFormatError.. this guy is defined in CoreAudio/AudioHardware.h, which seems to be a hardware related problem. I couldn’t find much useful information about this error on the web.

The interesting part is that earlier on I faced a similar problem while attempting this:

// create the audio 
err = AudioQueueNewOutput(&asbd, MyAudioQueueOutputCallback, self, NULL, NULL, 0, &
    if (err)
{
    [self failWithErrorCode:AS_AUDIO_QUEUE_CREATION_FAILED];
    return;
}

(the same problem faced in this post, but the author of the post mistakenly attributed their error code to AudioQueueStart rather than AudioQueueNewOutput)

I got this error code: kAudioFormatUnsupportedDataFormatError.. and my remedy was manually adding this code:

asbd.mFormatID = kAudioFormatMPEGLayer3;

since I discovered that calling

AudioFileStreamGetProperty(inAudioFileStream, kAudioFileStreamProperty_DataFormat, &asbdSize, &asbd);

initially gave me kAudioFormatMPEGLayer1 as the mFormatID rather than kAudioFormatMPEGLayer3, which is .mp3 which is what the audio file i’m playing actually is.

Finally.. probably the first time I noticed something was wrong was when I initially called this function:

AudioFileStreamOpen((__bridge void*)streamer, ASPropertyListenerProc, ASPacketsProc, 
                                        0, &(streamer->audioFileStream));

the first time I didn’t provide the inFileTypeHint to the function it resulted in the

AudioFileStreamParseBytes(streamer->audioFileStream, inDataByteSize, inData, 0);

call to fail to parse the bytes.. (specifically.. I got the Parse bytes failed. err: typ? 1954115647 error message, which is kAudioFileUnsupportedFileTypeError)..

the way I got around that was by (you guessed it) manually adding the file type hint:

    streamer->err = AudioFileStreamOpen((__bridge void*)streamer, ASPropertyListenerProc, ASPacketsProc, 
                                        kAudioFileMP3Type, &(streamer->audioFileStream));

so you can see.. a problem i’ve pushed under the rug is finally coming around to bite me.. but i’m not sure why the parser is failing to recognize my audio file type manually.. and why I have to keep on hardcoding that value.. only to have it fail at the end.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-10T03:07:57+00:00Added an answer on June 10, 2026 at 3:07 am

    As it turns out, my packets were not coming in the right order (nor where they complete).. the way I figured that out was by using a hex program (hexFiend) to open the mp3 file in question, then I compared key packets with what was actually being sent over.. I fixed that discrepancy and everything worked fine after that.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm working on streaming live video to ipad/iphone using apple's http live streaming. One
I'm using this code for video streaming, and it's working fine. When a song
I am working on an live audio streaming project, in which the live audio
I'm working on a streaming audio player for Linux/OS X with a bizarre use
I'm working on a program processing streaming data based on MS-RTSP protocol and it's
OK. AvPlayer is working great with streaming audio. In my app I have UISlider
Last night, my app was working just fine streaming audio files with the MediaPlayer
I'm using MPMoviePlayer to stream audio from a podcast and so far it's working
I've been working on a P2P live streaming app and I'm having some trouble
I am using MPMoviePlayerController to play streaming audio. I'm trying to get background audio

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.