• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Receiving Strange Static When Trying to Render Vorbis Files
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Receiving Strange Static When Trying to Render Vorbis Files


  • Subject: Receiving Strange Static When Trying to Render Vorbis Files
  • From: "Jonathan Kantrowitz" <email@hidden>
  • Date: Wed, 9 Jan 2008 18:56:33 -0500

Hi there,
I currently have tried to implement Vorbis file playback in an application I am working on, but  the audio is coming out laced with static 10 times louder then it should be. I am using audioqueue and libvorbis to playback ogg vorbis. Below is my render method. I have tried to pinpoint what the problem is but alas I have had no luck (I can't figure it if it's endian or floating point related or just something with the buffer. Any help would be greatly appreciated.


- (void)_audioQueue:(AudioQueueRef)audioQueue fillBuffer:(AudioQueueBufferRef)audioBuffer
{
    int bufferSize = audioBuffer->mAudioDataBytesCapacity;
   
    char *buffer = audioBuffer->mAudioData;
    int size = 0;
    do
    {
        int blockSize = ov_read(_oggStream, &((char *)buffer)[size], bufferSize - size, kIsBigEndian, 2, 1, nil);
        if(blockSize > 0)
        {
            size += blockSize;
        }
        else
        {
            break;
        }
    }
    while(size < bufferSize);
   
    if(size == 0)
    {
        [self performSelectorOnMainThread:@selector(_streamDidEnd) withObject:nil waitUntilDone:NO];
    }
    else
    {
        audioBuffer->mAudioDataByteSize = size;
        AudioQueueEnqueueBuffer(audioQueue, audioBuffer, 0, NULL);
    }
}

Regards,
Jonathan Kantro
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Coreaudio-api mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: Receiving Strange Static When Trying to Render Vorbis Files
      • From: Jeff Moore <email@hidden>
  • Prev by Date: Re: threads
  • Next by Date: Re: Receiving Strange Static When Trying to Render Vorbis Files
  • Previous by thread: Re: M4A Max File Size
  • Next by thread: Re: Receiving Strange Static When Trying to Render Vorbis Files
  • Index(es):
    • Date
    • Thread