• 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
sample rate & noise issue while playing the audio stream
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

sample rate & noise issue while playing the audio stream


  • Subject: sample rate & noise issue while playing the audio stream
  • From: Jason Lin <email@hidden>
  • Date: Wed, 15 Feb 2012 14:18:52 +0800

The audio file is recorded with 44.1k sample rate, Mono, 16 bit, uLaw PCM.

 

Everything works fine if I play this file locally using the audio toolbox’s file service, or runs the RTSP server and using VLC to play the streamed audio is also no problem.

 

But if I do my audio streaming then things go bad:

 

I use the alBufferData API like the below one:

 

/* Specify the data to be copied into a buffer */

AL_API void AL_APIENTRY

alBufferData( ALuint bid, ALenum format, const ALvoid* data, ALsizei size, ALsizei freq );

 

The procedure of handling the audio data is:

1.      RTSP data goes into ringbuffer,

2.      OpenAL queries its ALbuffer and if the data been processed then dequeue that buffer and copy the data from ringbuffer to it, and then enqueue that buffer.

 

 

And I found that if ALsizei freq = 44.1k, then all I can hear is the noise, but if I change ALsizei freq = 22050 (half of the sample rate), the words in audio can be understandable but is comes up with noise, too.

 

 

Any useful guidance will be highly appreciated or anyone knows where should I look into VLC code?

 

 _______________________________________________
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

  • Prev by Date: Re: Glissando: smoothing touch drags
  • Next by Date: Re: Need to access/manipulate mixed output: MultiChannelMixer + AudioConverter, or mix manually?
  • Previous by thread: Re: Glissando: smoothing touch drags
  • Next by thread: time accuracy of AU render callback
  • Index(es):
    • Date
    • Thread