[gst-devel] oss trouble & lame caps

Thomas Vander Stichele thomas at urgent.rug.ac.be
Wed Feb 20 03:12:08 CET 2002


Hi gang,

I've noticed that quite a few of my soundcards insist on opening the sound 
card at 44101 Hz.

You might think "that's not really a big problem. It's only about a 1/10th 
sec difference per hour".

Well, it is a big problem.  First of all, this means the caps sent out 
will also be 44101 Hz.  Lame cannot - and should not - encode this.  (atm 
the caps allow 8000-48000, so I'm going to change that unless someone 
objects). 

Second, Ronald tells me some cards even return bigger differences.

What should be done about this ?

a) have osssrc always put out the caps requested by the app regardless of 
what oss sets it at; this sounds bad but is the easiest fix.  It'll 
probably timestretch and pitchshift the audio but in my case that's not 
that big of an issue.

b) make sink's rate of lame only accept allowed values; I will do that.

c) insert a resampler plugin in the pipeline; imo that's a bit overkill, 
especially for my purposes

d) write a sample dropper plugin which regularly drops samples to adapt 
for the rate difference; for small differences this might work.

e) write a plugin that ignores all audio properties and just sets output 
rate to the value you need for encoding, and just treat incoming data as 
if it's that rate regardless of input rate.

Any ideas and comments are much welcomed, I'm willing to experiment 
because I wnat this to work ;)

Thomas

-- 

The Dave/Dina Project : future TV today ! - http://davedina.apestaart.org/
<-*-                      -*->
If only you'd come back to me
If you laid at my side
wouldn't need no mojo pin
to keep me satisfied
<-*- thomas at apestaart.org -*->
URGent, the best radio on the Internet - 24/7 ! - http://urgent.rug.ac.be/





More information about the gstreamer-devel mailing list