[music-dsp] Re: Mixing Multirate streams
gautam at koperasw.com
gautam at koperasw.com
Thu Feb 24 09:20:38 EST 2005
I am using the same resampling library as used by MAD so apparently that is not
an issue.Windows is a forbidden word for me when it comes to engineering work.
Another thing that's interesting is that when I apply the same logic to 2
similar streams, viz 2 MP3s' or two GSMs' it works perfectly fine.In their case
the size of the buffers to be mixed are the same. So why is only a difference in
buffer size creating such a problem in the first place?
You could probably elaborate on what you mean by "correct" ! The resampling
library is pretty consistent in its performance.
Joshua, a startup that my company is, outsourcing work to consultants is a
little less feasible than putting more hours on the problem (and probably more
cheap...I work in India remember ;-) )
Thanks for your response. I do expect some more from everybody who's worked on
mixing streams though.
>Maybe there's a problem with your resampling. For instance if you rely on
>Windows archaic ACM system to resample for you, the results are miserable.
>You said "I have a practical observation that sound quality is retained only
>for the stream with the larger buffer"
>If you resample properly then the quality of both streams will be preserved.
>Note that if the sampling rate is very low then oddly enough, you may have
>to be more careful and more 'correct' when resampling that stream if you
>want to preserve the intelligibility.
I once wrote resampling code for a telephone-email system. I'm available if
you want to hire me to do the same sort of thing again :)
----- Original Message -----
From: <gautam at koperasw.com>
To: <music-dsp at ceait.calarts.edu>
Sent: Wednesday, February 23, 2005 10:23 PM
Subject: [music-dsp] Mixing Multirate streams
> I have been trying to mix a GSM stream and an MP3 stream using the
> Assuming these have to be played through a PC sound card at 48k
> Step1> Resample MP3 PCM buffer to 48K
> Step2> Resample GSM PCM buffer to 48k
> Check buffer sizes after resampling and passing on the final buffer to
> with Final buffer size is the larger of the 2 resampled buffers. This
> adding the smaller sized buffer samples into the larger ones atomically.
> So far so good,theoretically.
> I have a practical observation that sound quality is retained only for the
> stream with the larger buffer.To confirm this,I have played around with
> the GSM codec produce more samples per iteration so its resampled buffer
> will exceed the MP3 resampled buffer size. Only when both buffer sizes are
> close to each other is the output a bit better , though a far cry from
> Earlier I had thought there might be something in the fact that MP3
> "signed int" while GSM samples are "signed short" convertedto "signed
> then observation about the buffer sizes is clearly more of a reason, to be
> looked into as the problem statement.
> I am trying out different things now, but that would probably make the
> logic lose its generic nature.
> Any and all suggestions / insights are welcome.
> Thanks in advance,
More information about the music-dsp