electrodyssey.net

Odyssey of Electronics and Computers

Tascam US-4x4HR linux config utility

October 25, 2023 — Nazim

A while ago I was trying to bring up the sound card Tascam US-4x4HR on a linux server. Linux usb sound module was functional, but the card was mixing the inputs, and I didn't wanted that. After hours of searching through the Internet, I haven't found anything usable, and resorted to "sniffing" the usb control transfers of the official windows utility, and reproducing them with libusb on linux. Surprisingly, it worked well. Here is the link to the potascam github repo. Quick and dirty, as usual.

Tags: linux, sound, tascam, potascam

DDS sound generator with PortAudio

February 08, 2021 — Nazim

I've been looking for an easy to use and portable library to generate audio tones, so PortAudio seemed like an obvious choice. PortAudio is not only surprisingly easy to use and comes with many excellent examples, but also provides a control over the callback execution latency. You could specify how many samples to be processed with a callback, or let PortAudio decide the optimal count. Although, PortAudio is not officially called a DSP library, it's pretty much useful for DSP. Best of all, you could combine multiple audio samples by adding them together, to get a multi-tone output. Building the library on Windows with VisualStudio was quite easy and is well documented here. All you need to do is disable the console output and unneeded backends (ASIO in my case). To disable the ASIO, navitage to the project explorer and remove the Source Files->hostapi->ASIO. Then, edit the portaudio.def and comment out the exports starting with PaAsio_. Debug console output can be removed from the preprocessor definitions in the project's properties. There been some old trouble reports of Windows 10 not playing well with x86 32-bit compiled PortAudio DLL, so I've built an x64 library which worked great.

Initialization of the audio stream is well described in examples, the only thing which was not that obvious is how-to use a WASAPI output in exclusive mode, so here is the snippet:

Read more...