21 Mar 2006 zx80user   » (Journeyer)

Although I claimed to have a working driver ten days ago in fact all it did was play 8 bit mono. Now I have one that will play 16 bit stereo too.

Try as I might I just could not get the stereo to work - firstly because I assumed that, as I had done with the OSS driver, I'd have to write the stereo separation code myself (in fact the ALSA middle layer does all that) and then because of what appeared to be repeated buffer over-runs.

I had built an OSS only version of mpg123 to test this and try as I might I just got clicks and gaps as the middle layer responded to the over runs by restarting the DMA transfer.

Eventually I realised that ALSA was assuming that my buffer stayed a constant size (in fact it doubles in size for stereo). Once I cut the hardware buffers in half and fixed up the period sizes to something close to optimum it all worked.

I can now also see how to add additional channels - not too difficult really. But I am not sure I can see a reason.

Working on the mixer code now.

Latest blog entries     Older blog entries

New Advogato Features

New HTML Parser: The long-awaited libxml2 based HTML parser code is live. It needs further work but already handles most markup better than the original parser.

Keep up with the latest Advogato features by reading the Advogato status blog.

If you're a C programmer with some spare time, take a look at the mod_virgule project page and help us with one of the tasks on the ToDo list!