Hi,
while reading a thread in the wishlist about being able to adjust the delay between front and rear and left & right speakers on the empeg - I had a thought.

Given that we assume for a minute that a front/rear delay is not available to us due to NDA requirements with the DSP and some comments that the DSP may not support a variable fron/trear delay anyway.

However , smu made a suggestion about left/right delay should be do-able in software, and having thought about it, I agree.

As the VolAdj hack showed, getting at/fiddling with the PCM stream that goes from the mp3 decoder to the DSP is possible - thats what VolAdj does now.


We could do a software delay between left & right speakers by simply shifting the PCM samples for the left or right channel a [user settable] number of samples from the matching channel [effectively causing a 'left/right' channel delay.

Effectively every left channel sample in the PCM stream would be moved n samples down the PCM stream, this would introduce a [small] delay in the left channel signal relative to the Right [untouched] channel stream.
[You could do the Right hand channel samples only to produce a delay between left & right]

As we are merely moving the samples we only need to buffer 'n' samples in a FIFO fashion.

I am not sure how big a buffer would be needed to do this - I would kind of hope the existing VolAdj buffer would be large enough already, as with 44,100 samples a second flowing past thats 44100*2*16 bits a second to deal with (88200*2 bytes = 160Kbytes/second).

In a confined space like a car with only 1-2 metres 'delay' required between left to right then we could probably do that within the few blocks already used for the look ahead by VolAdj.

So, can anyone who has looked at the VolAdj code comment on the largest delay between left & right channels we can do now without using more memory in the kernel?

[and what would that equate to in terms of 'centering' the driver between left & right speakers?].

Whatever we come up with, would need to work for both Left Hand Drive countries [like Canada & the US] and Right Hand Drive countries (i.e. the rest of the Civilised world :-)) ).

This could be done by making the 'delay' a integer number with postive values for moving the 'drivers ears' to the right and negative value for the other way [or v.v.].

That could be a nice complement to the VolAdj hack if it was do-able.

I doubt we can do anything about front/rear delay as thats not something we can control by tweaking the PCM data stream.

Any comments?