GithubHelp home page GithubHelp logo

Comments (7)

isalkind avatar isalkind commented on July 17, 2024

Broke between the Nov 24, 2009 checkpoint and the Mar 29, 2010 checkpoint.

from audiostreamer.

ghassett avatar ghassett commented on July 17, 2024

I am having this exact same problem -- MP3's play, but WAV's cause the app to crash.

I am working through the code in the debugger but cannot yet figure out why AudioQueueEnqueueBuffer returns -50 as an error on line 1372 of AudioStreamer.m.

Anyone have any suggestions? Here's where err comes back as -50:


if (packetsFilled)
{
    err = AudioQueueEnqueueBuffer(audioQueue, fillBuf, packetsFilled, packetDescs);
}
else
{
    err = AudioQueueEnqueueBuffer(audioQueue, fillBuf, 0, NULL);
}
        
if (err)
{
    [self failWithErrorCode:AS_AUDIO_QUEUE_ENQUEUE_FAILED];
    return;
}

from audiostreamer.

isalkind avatar isalkind commented on July 17, 2024

I did come up with a fix for this problem. If I recall correctly it had something to do with how VBR vs non-VBR streams are handled. Give me a chance to look at my changes and I will post later in the day.

from audiostreamer.

ghassett avatar ghassett commented on July 17, 2024

Wow, thank you so much for your speedy response. Looking forward to the fix. I found a version of AudioStreamer that DOES in fact play WAV files (it's an older version of your code, without your other improvements). I stepped through the code for both and am completely baffled why one works and the other doesn't, because they both appear to be calling into the audio framework in exactly the same way. I really appreciate your help and your work -- thank you.

from audiostreamer.

isalkind avatar isalkind commented on July 17, 2024

I forked the repository and committed my changes. You can find them in the 'isalkind' branch. Only touched the AudioStreamer.h & AudioStreamer.m files. Certain calculations assumed VBR. These changes try to detect when something is non-VBR (CBR) and make calculations appropriately.

Although the changes should work for other non-VBR streams, I have only tested them specifically with wav streams. Your millage may vary.

from audiostreamer.

ghassett avatar ghassett commented on July 17, 2024

Great fix, life is good. Thank you very, very much.

from audiostreamer.

bhavinb avatar bhavinb commented on July 17, 2024

Faced the same issue and used fixed version of the streamer provided by isalkind. Wav streaming works great now. Thanks isalkind!!

from audiostreamer.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.