HydrogenAudio

Hosted Forums => foobar2000 => Development - (fb2k) => Topic started by: steel_monkey on 2012-12-10 14:35:31

Title: Plugin for format conversion
Post by: steel_monkey on 2012-12-10 14:35:31
Hello.
I want to ask help about plug in development. As I see, it is not tons of work to do, but as I am quite new to PC programming, it represents big and, most problem, time consuming action.

I am developing external DAC unit using not conventional sound integrated circuits, but industrial ones. Don`t ask why, answer will be "because"  .

Industrial DACs have little different input format by comparison with sound ICs, i.e. most significant bit is inverted. As I am going to use PC as a source of digital data, it is easier to convert format there, as it is more flexible. So, the question is, how to invert MSB in audio stream? I see a foobar plugin will be quite elegant solution. In MCU I would have XORed data with required mask, but I am total noob in PC programming, unfortunately.

Another question is, I will change sample rate using foobar plugin to, so MSB inversion should be done after digital filtering.

After that, data is sent to USB using asio4all.
Title: Plugin for format conversion
Post by: foosion on 2012-12-10 16:36:00
The best place in foobar2000 would be in the output module since everything before that uses floating point values to represent the audio data. Unfortunately the output API is not part of the public SDK so it cannot be extended by third-party plugins.

Generally the best place to do this conversion would be in the driver for your hardware.
Title: Plugin for format conversion
Post by: steel_monkey on 2012-12-10 16:59:18
Thank you very much.
Driver modification is, unfortunately, totally unavailable. Isn`t it possible to send audiostream to some intermediate program, recalculate it and send farther to ASIO for example?