<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Articles on Victor Gaydov</title>
    <link>http://gavv.net/articles/</link>
    <description>Recent content in Articles on Victor Gaydov</description>
    <generator>Hugo -- gohugo.io</generator>
    <language>en-us</language>
    <lastBuildDate>Sat, 15 Jun 2024 00:00:00 +0000</lastBuildDate>
    <atom:link href="http://gavv.net/articles/" rel="self" type="application/rss+xml" />
    
    <item>
      <title>Roc Toolkit 0.4 &#43; updated tutorial for live audio streaming</title>
      <link>http://gavv.net/articles/roc-0.4/</link>
      <pubDate>Sat, 15 Jun 2024 00:00:00 +0000</pubDate>
      
      <guid>http://gavv.net/articles/roc-0.4/</guid>
      <description>&lt;a data-lightbox=&#34;photo&#34; href=&#34;http://gavv.net/articles/roc-0.4/photo.jpg&#34;&gt;
  &lt;img src=&#34;http://gavv.net/articles/roc-0.4/photo.jpg&#34; width=&#34;400px&#34;/&gt;
&lt;/a&gt;
&lt;p&gt;&lt;b&gt;Table of contents&lt;/b&gt;&lt;/p&gt;
&lt;nav id=&#34;TableOfContents&#34;&gt;
  &lt;ul&gt;
    &lt;li&gt;&lt;a href=&#34;#whats-in-this-release&#34;&gt;What&amp;rsquo;s in this release&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;&lt;a href=&#34;#migration-from-03&#34;&gt;Migration from 0.3&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;&lt;a href=&#34;#linux-pipewire-modules&#34;&gt;Linux (PipeWire modules)&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;&lt;a href=&#34;#linux-pulseaudio-modules&#34;&gt;Linux (PulseAudio modules)&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;&lt;a href=&#34;#linux-bare-alsa&#34;&gt;Linux (bare ALSA)&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;&lt;a href=&#34;#cross-compile-to-raspberry-pi-pulseaudio-modules&#34;&gt;Cross-compile to Raspberry Pi (PulseAudio modules)&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;&lt;a href=&#34;#cross-compile-to-raspberry-pi-bare-alsa&#34;&gt;Cross-compile to Raspberry Pi (bare ALSA)&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;&lt;a href=&#34;#macos-virtual-device&#34;&gt;macOS (virtual device)&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;&lt;a href=&#34;#macos-cli-tools&#34;&gt;macOS (CLI tools)&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;&lt;a href=&#34;#android-app&#34;&gt;Android app&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;&lt;a href=&#34;#troubleshooting&#34;&gt;Troubleshooting&lt;/a&gt;&lt;/li&gt;
  &lt;/ul&gt;
&lt;/nav&gt;
&lt;hr&gt;
&lt;h1 id=&#34;whats-in-this-release&#34;&gt;
  What&amp;rsquo;s in this release
  &lt;a class=&#34;anchor&#34; href=&#34;#whats-in-this-release&#34;&gt;
    &lt;i class=&#34;fa fa-hashtag&#34;&gt;&lt;/i&gt;
  &lt;/a&gt;
&lt;/h1&gt;
&lt;p&gt;&lt;a href=&#34;https://github.com/roc-streaming/roc-toolkit&#34;&gt;Roc Toolkit&lt;/a&gt; implements real-time streaming over unreliable networks like Internet and Wi-Fi, with high quality and low latency.&lt;/p&gt;
&lt;p&gt;It can connect audio apps and devices across network, which run PipeWire, PulseAudio, bare ALSA, macOS CoreAudio, and Android. You can use it via &lt;a href=&#34;https://roc-streaming.org/toolkit/docs/api.html&#34;&gt;C library&lt;/a&gt;, &lt;a href=&#34;https://roc-streaming.org/toolkit/docs/api/bindings.html&#34;&gt;bindings&lt;/a&gt;, &lt;a href=&#34;https://roc-streaming.org/toolkit/docs/tools/command_line_tools.html&#34;&gt;CLI tools&lt;/a&gt;, &lt;a href=&#34;https://roc-streaming.org/toolkit/docs/tools/sound_server_modules.html&#34;&gt;sound server extensions&lt;/a&gt;, and &lt;a href=&#34;https://github.com/roc-streaming/roc-droid/&#34;&gt;Android app&lt;/a&gt;.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Roc Toolkit 0.3 is out!</title>
      <link>http://gavv.net/articles/roc-0.3/</link>
      <pubDate>Wed, 22 Nov 2023 00:00:00 +0000</pubDate>
      
      <guid>http://gavv.net/articles/roc-0.3/</guid>
      <description>&lt;h1 id=&#34;whats-new&#34;&gt;
  What&amp;rsquo;s new
  &lt;a class=&#34;anchor&#34; href=&#34;#whats-new&#34;&gt;
    &lt;i class=&#34;fa fa-hashtag&#34;&gt;&lt;/i&gt;
  &lt;/a&gt;
&lt;/h1&gt;
&lt;p&gt;&lt;a href=&#34;https://github.com/roc-streaming/roc-toolkit&#34;&gt;Roc Toolkit&lt;/a&gt; implements real-time streaming over unreliable networks like Internet and Wi-Fi. It works on Linux and macOS and provides &lt;a href=&#34;https://roc-streaming.org/toolkit/docs/api.html&#34;&gt;C library&lt;/a&gt;, &lt;a href=&#34;https://roc-streaming.org/toolkit/docs/tools/command_line_tools.html&#34;&gt;CLI tools&lt;/a&gt;, modules for &lt;a href=&#34;https://roc-streaming.org/toolkit/docs/tools/sound_server_modules.html&#34;&gt;PulseAudio and PipeWire&lt;/a&gt;, and &lt;a href=&#34;https://github.com/roc-streaming/roc-droid/&#34;&gt;Android app&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;The 0.3 release was focused on:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;reducing minimum allowed latency&lt;/li&gt;
&lt;li&gt;running in CPU-constrained environments&lt;/li&gt;
&lt;li&gt;extending C API&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Full changelog is &lt;a href=&#34;https://roc-streaming.org/toolkit/docs/development/changelog.html#version-0-3-0-nov-22-2023&#34;&gt;available here&lt;/a&gt;.&lt;/p&gt;
&lt;h1 id=&#34;latency&#34;&gt;
  Latency
  &lt;a class=&#34;anchor&#34; href=&#34;#latency&#34;&gt;
    &lt;i class=&#34;fa fa-hashtag&#34;&gt;&lt;/i&gt;
  &lt;/a&gt;
&lt;/h1&gt;
&lt;p&gt;To allow lower latencies, two changes were made:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;All pipeline elements were reworked to accept arbitrary frame sizes. Earlier, some of them were using frames of fixed size which put limitations on the minimum possible latency.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Two C&#43;&#43;17 projects open for contributions</title>
      <link>http://gavv.net/articles/cpp-help-wanted/</link>
      <pubDate>Wed, 20 Sep 2023 00:00:00 +0000</pubDate>
      
      <guid>http://gavv.net/articles/cpp-help-wanted/</guid>
      <description>&lt;h1 id=&#34;signal-estimator&#34;&gt;
  Signal Estimator
  &lt;a class=&#34;anchor&#34; href=&#34;#signal-estimator&#34;&gt;
    &lt;i class=&#34;fa fa-hashtag&#34;&gt;&lt;/i&gt;
  &lt;/a&gt;
&lt;/h1&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;https://github.com/gavv/signal-estimator&#34;&gt;project&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://github.com/gavv/signal-estimator/labels/help%20wanted&#34;&gt;issues&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;This one implements a tool (both CLI and GUI) for measuring audio latency and glitches.&lt;/p&gt;
&lt;p&gt;The idea behind the tool is simple: you have an audio loopback that connects audio output to audio input; the tool writes impulses to the output, waits until the same impulses are received from the input, and measures the delay or other properties.&lt;/p&gt;
&lt;img src=&#34;http://gavv.net/articles/cpp-help-wanted/signal_estimator.png&#34; width=&#34;400px&#34;/&gt;
&lt;p&gt;I&amp;rsquo;m using this tool at work for measuring latency of various audio software. Here is an example of a real-world usage, a test bench for measuring latency of audio streaming between two boards over Ethernet:&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Debian Linux on Dell XPS 15</title>
      <link>http://gavv.net/articles/dell-xps15/</link>
      <pubDate>Wed, 15 Mar 2023 00:00:00 +0000</pubDate>
      
      <guid>http://gavv.net/articles/dell-xps15/</guid>
      <description>&lt;a data-lightbox=&#34;roc_devicec&#34; href=&#34;http://gavv.net/articles/dell-xps15/dell.jpg&#34;&gt;
  &lt;img src=&#34;http://gavv.net/articles/dell-xps15/dell.jpg&#34; width=&#34;430px&#34;/&gt;
&lt;/a&gt;
&lt;p&gt;&lt;b&gt;Table of contents&lt;/b&gt;&lt;/p&gt;
&lt;nav id=&#34;TableOfContents&#34;&gt;
  &lt;ul&gt;
    &lt;li&gt;&lt;a href=&#34;#installing-debian&#34;&gt;Installing Debian&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;&lt;a href=&#34;#video&#34;&gt;Video&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;&lt;a href=&#34;#audio&#34;&gt;Audio&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;&lt;a href=&#34;#connectivity&#34;&gt;Connectivity&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;&lt;a href=&#34;#inputs&#34;&gt;Inputs&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;&lt;a href=&#34;#suspend&#34;&gt;Suspend&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;&lt;a href=&#34;#dock-station&#34;&gt;Dock station&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;&lt;a href=&#34;#info&#34;&gt;Info&lt;/a&gt;&lt;/li&gt;
  &lt;/ul&gt;
&lt;/nav&gt;
&lt;p&gt;This is a small report and how-to on running Debian on &lt;a href=&#34;https://www.dell.com/en-us/shop/dell-laptops/xps-15-laptop/spd/xps-15-9520-laptop&#34;&gt;Dell XPS 15 9520&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;TL;DR:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;on the whole, it works well&lt;/li&gt;
&lt;li&gt;use Debian Bookworm or later&lt;/li&gt;
&lt;li&gt;be aware of sound quality issues of built-in speakers on Linux&lt;/li&gt;
&lt;li&gt;be aware of possible issues with dock station after hibernation&lt;/li&gt;
&lt;/ul&gt;
&lt;hr&gt;
&lt;h1 id=&#34;installing-debian&#34;&gt;
  Installing Debian
  &lt;a class=&#34;anchor&#34; href=&#34;#installing-debian&#34;&gt;
    &lt;i class=&#34;fa fa-hashtag&#34;&gt;&lt;/i&gt;
  &lt;/a&gt;
&lt;/h1&gt;
&lt;p&gt;First of all, open BIOS (press F12 after turning on) and adjust a few settings:&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Updated tutorial for Roc 0.2</title>
      <link>http://gavv.net/articles/roc-tutorial-0.2/</link>
      <pubDate>Mon, 27 Feb 2023 00:00:00 +0000</pubDate>
      
      <guid>http://gavv.net/articles/roc-tutorial-0.2/</guid>
      <description>&lt;p&gt;&lt;b&gt;Table of contents&lt;/b&gt;&lt;/p&gt;
&lt;nav id=&#34;TableOfContents&#34;&gt;
  &lt;ul&gt;
    &lt;li&gt;&lt;a href=&#34;#whats-new&#34;&gt;What&amp;rsquo;s new?&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;&lt;a href=&#34;#linux-desktop-pulseaudio&#34;&gt;Linux desktop (PulseAudio)&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;&lt;a href=&#34;#linux-desktop-pipewire&#34;&gt;Linux desktop (PipeWire)&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;&lt;a href=&#34;#raspberry-pi-alsa&#34;&gt;Raspberry Pi (ALSA)&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;&lt;a href=&#34;#raspberry-pi-pulseaudio&#34;&gt;Raspberry Pi (PulseAudio)&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;&lt;a href=&#34;#macos&#34;&gt;macOS&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;&lt;a href=&#34;#android&#34;&gt;Android&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;&lt;a href=&#34;#troubleshooting&#34;&gt;Troubleshooting&lt;/a&gt;&lt;/li&gt;
  &lt;/ul&gt;
&lt;/nav&gt;
&lt;hr&gt;
&lt;div class=&#34;info-block&#34;&gt;
  &lt;div class=&#34;info-header&#34;&gt;
    UPDATE
  &lt;/div&gt;
  You can find tutorial updated for &lt;b&gt;0.4.x&lt;/b&gt; release series in &lt;a href=&#34;http://gavv.net/articles/roc-0.4/&#34;&gt;&lt;b&gt;this article&lt;/b&gt;&lt;/a&gt;.
&lt;/div&gt;
&lt;h1 id=&#34;whats-new&#34;&gt;
  What&amp;rsquo;s new?
  &lt;a class=&#34;anchor&#34; href=&#34;#whats-new&#34;&gt;
    &lt;i class=&#34;fa fa-hashtag&#34;&gt;&lt;/i&gt;
  &lt;/a&gt;
&lt;/h1&gt;
&lt;p&gt;This article is an updated version of &lt;a href=&#34;https://gavv.net/articles/roc-tutorial/&#34;&gt;previous tutorial&lt;/a&gt;. An overview of the new release is &lt;a href=&#34;https://gavv.net/articles/roc-0.2/&#34;&gt;available here&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;There are two main changes that affect users:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;PulseAudio modules moved to a &lt;a href=&#34;https://github.com/roc-streaming/roc-pulse&#34;&gt;separate repo&lt;/a&gt; and have their own build system and new build instructions.&lt;/li&gt;
&lt;li&gt;Command-line tools now use universal URI notation for network endpoints and audio devices.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;This table provides examples of old and new notation.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Roc Toolkit 0.2 released</title>
      <link>http://gavv.net/articles/roc-0.2/</link>
      <pubDate>Sun, 26 Feb 2023 00:00:00 +0000</pubDate>
      
      <guid>http://gavv.net/articles/roc-0.2/</guid>
      <description>&lt;img src=&#34;http://gavv.net/articles/roc-0.2/roc_droid.png&#34; style=&#34;margin-top: 20px;&#34;/&gt;
&lt;h1 id=&#34;what-is-roc&#34;&gt;
  What is Roc?
  &lt;a class=&#34;anchor&#34; href=&#34;#what-is-roc&#34;&gt;
    &lt;i class=&#34;fa fa-hashtag&#34;&gt;&lt;/i&gt;
  &lt;/a&gt;
&lt;/h1&gt;
&lt;p&gt;Roc is a toolkit for real-time streaming over unreliable networks. It works with desktop and embedded Linux, ALSA, PulseAudio, PipeWire, macOS, and Android.&lt;/p&gt;
&lt;p&gt;For a quick intro, see &lt;a href=&#34;https://github.com/roc-streaming/roc-toolkit&#34;&gt;project repo&lt;/a&gt; and two previous articles: &lt;a href=&#34;https://gavv.net/articles/new-network-transport/&#34;&gt;1&lt;/a&gt;, &lt;a href=&#34;https://gavv.net/articles/roc-0.1/&#34;&gt;2&lt;/a&gt;.&lt;/p&gt;
&lt;h1 id=&#34;summary&#34;&gt;
  Summary
  &lt;a class=&#34;anchor&#34; href=&#34;#summary&#34;&gt;
    &lt;i class=&#34;fa fa-hashtag&#34;&gt;&lt;/i&gt;
  &lt;/a&gt;
&lt;/h1&gt;
&lt;p&gt;Full changelog is &lt;a href=&#34;https://roc-streaming.org/toolkit/docs/development/changelog.html#version-0-2-0-dec-19-2022&#34;&gt;available here&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;The main focus of this release was:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;polishing C API&lt;/li&gt;
&lt;li&gt;creating bindings for &lt;a href=&#34;https://github.com/roc-streaming/roc-go&#34;&gt;Go&lt;/a&gt; and &lt;a href=&#34;https://github.com/roc-streaming/roc-java/&#34;&gt;Java&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Android support&lt;/li&gt;
&lt;li&gt;preparing internals for control and signaling protocols&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;We also created a small &lt;a href=&#34;https://github.com/roc-streaming/roc-droid/&#34;&gt;Android app&lt;/a&gt;.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>A step-by-step tutorial for live audio streaming with Roc</title>
      <link>http://gavv.net/articles/roc-tutorial/</link>
      <pubDate>Wed, 14 Aug 2019 00:00:00 +0000</pubDate>
      
      <guid>http://gavv.net/articles/roc-tutorial/</guid>
      <description>&lt;a data-lightbox=&#34;roc_devices&#34; href=&#34;http://gavv.net/articles/roc-tutorial/roc_devices.jpg&#34;&gt;
  &lt;img src=&#34;http://gavv.net/articles/roc-tutorial/roc_devices.jpg&#34; width=&#34;430px&#34;/&gt;
&lt;/a&gt;
&lt;p&gt;&lt;b&gt;Table of contents&lt;/b&gt;&lt;/p&gt;
&lt;nav id=&#34;TableOfContents&#34;&gt;
  &lt;ul&gt;
    &lt;li&gt;&lt;a href=&#34;#what-is-roc&#34;&gt;What is Roc?&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;&lt;a href=&#34;#whats-new&#34;&gt;What&amp;rsquo;s new?&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;&lt;a href=&#34;#ubuntu-desktop&#34;&gt;Ubuntu desktop&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;&lt;a href=&#34;#raspberry-pi-alsa&#34;&gt;Raspberry Pi (ALSA)&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;&lt;a href=&#34;#raspberry-pi-pulseaudio&#34;&gt;Raspberry Pi (PulseAudio)&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;&lt;a href=&#34;#macos&#34;&gt;macOS&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;&lt;a href=&#34;#android--termux&#34;&gt;Android / Termux&lt;/a&gt;&lt;/li&gt;
  &lt;/ul&gt;
&lt;/nav&gt;
&lt;hr&gt;
&lt;div class=&#34;info-block&#34;&gt;
  &lt;div class=&#34;info-header&#34;&gt;
    UPDATE
  &lt;/div&gt;
  You can find tutorial updated for &lt;b&gt;0.4.x&lt;/b&gt; release series in &lt;a href=&#34;http://gavv.net/articles/roc-0.4/&#34;&gt;&lt;b&gt;this article&lt;/b&gt;&lt;/a&gt;.
&lt;/div&gt;
&lt;h1 id=&#34;what-is-roc&#34;&gt;
  What is Roc?
  &lt;a class=&#34;anchor&#34; href=&#34;#what-is-roc&#34;&gt;
    &lt;i class=&#34;fa fa-hashtag&#34;&gt;&lt;/i&gt;
  &lt;/a&gt;
&lt;/h1&gt;
&lt;p&gt;Roc is an open-source toolkit for real-time audio streaming over the network. You can learn about the project here: &lt;a href=&#34;https://roc-streaming.org/toolkit/docs/about_project/overview.html&#34;&gt;overview&lt;/a&gt;, &lt;a href=&#34;https://roc-streaming.org/toolkit/docs/about_project/features.html&#34;&gt;features&lt;/a&gt;, &lt;a href=&#34;https://roc-streaming.org/toolkit/docs/about_project/usage.html&#34;&gt;usage&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Among other things, Roc can be used as a network transport for PulseAudio, ALSA, or macOS CoreAudio,  and connect audio applications and devices across the network. Roc has the following benefits in this case:&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Roc 0.1 released: real-time streaming over the network</title>
      <link>http://gavv.net/articles/roc-0.1/</link>
      <pubDate>Tue, 28 May 2019 00:00:00 +0000</pubDate>
      
      <guid>http://gavv.net/articles/roc-0.1/</guid>
      <description>&lt;img src=&#34;http://gavv.net/articles/roc-0.1/logo.png&#34; width=&#34;530px&#34;/&gt;
&lt;h1 id=&#34;what-is-roc&#34;&gt;
  What is Roc?
  &lt;a class=&#34;anchor&#34; href=&#34;#what-is-roc&#34;&gt;
    &lt;i class=&#34;fa fa-hashtag&#34;&gt;&lt;/i&gt;
  &lt;/a&gt;
&lt;/h1&gt;
&lt;p&gt;I&amp;rsquo;m happy to announce the first release of &lt;a href=&#34;https://roc-streaming.org/&#34;&gt;Roc Toolkit&lt;/a&gt;, version 0.1.0!&lt;/p&gt;
&lt;p&gt;Roc provides a &lt;a href=&#34;https://roc-streaming.org/toolkit/docs/api.html&#34;&gt;C API&lt;/a&gt; for real-time audio transport. The user just writes a stream to the one end and reads it from another end. Roc, in turn, performs encoding and decoding, and, more importantly, deals with the problems related to the real-time delivery: counters network jitter and packet reordering, maintains constant latency, restores lost packets, compensates the clocks difference.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Working on a new network transport for PulseAudio and ALSA</title>
      <link>http://gavv.net/articles/new-network-transport/</link>
      <pubDate>Fri, 03 May 2019 00:00:00 +0000</pubDate>
      
      <guid>http://gavv.net/articles/new-network-transport/</guid>
      <description>&lt;h1 id=&#34;intro&#34;&gt;
  Intro
  &lt;a class=&#34;anchor&#34; href=&#34;#intro&#34;&gt;
    &lt;i class=&#34;fa fa-hashtag&#34;&gt;&lt;/i&gt;
  &lt;/a&gt;
&lt;/h1&gt;
&lt;p&gt;Last few years I was working on &lt;a href=&#34;https://roc-streaming.org/&#34;&gt;Roc Toolkit&lt;/a&gt;, an open-source solution for real-time media streaming over the network. Due to lack of free time, we postponed release several times, but now it&amp;rsquo;s almost ready. This article is, inter alia, some kind of a pre-release announcement.&lt;/p&gt;
&lt;p&gt;You can read more about the project &lt;a href=&#34;https://roc-streaming.org/toolkit/docs/about_project.html&#34;&gt;here&lt;/a&gt;. The project scope is quite wide. It provides a general-purpose library and tools that can be used in numerous use-cases. However, to start with something feasible and practical, we decided to focus the first few releases on the home audio use-case.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Ephemeral ports and SO_REUSEADDR</title>
      <link>http://gavv.net/articles/ephemeral-port-reuse/</link>
      <pubDate>Sun, 03 Dec 2017 00:00:00 +0000</pubDate>
      
      <guid>http://gavv.net/articles/ephemeral-port-reuse/</guid>
      <description>&lt;h2 id=&#34;ephemeral-ports&#34;&gt;
  Ephemeral ports
  &lt;a class=&#34;anchor&#34; href=&#34;#ephemeral-ports&#34;&gt;
    &lt;i class=&#34;fa fa-hashtag&#34;&gt;&lt;/i&gt;
  &lt;/a&gt;
&lt;/h2&gt;
&lt;p&gt;The &lt;a href=&#34;https://en.wikipedia.org/wiki/Ephemeral_port&#34;&gt;ephemeral port&lt;/a&gt; range is a range of ports used by the kernel when the user wants the socket to be bound to a random unused port.&lt;/p&gt;
&lt;p&gt;In particular, &lt;code&gt;bind&lt;/code&gt;, &lt;code&gt;listen&lt;/code&gt;, &lt;code&gt;connect&lt;/code&gt;, and &lt;code&gt;sendto&lt;/code&gt; may automatically allocate an ephemeral port for AF_INET and AF_INET6 sockets. This behavior is described in the &lt;code&gt;ip_local_port_range&lt;/code&gt; section of the &lt;a href=&#34;http://man7.org/linux/man-pages/man7/ip.7.html&#34;&gt;&lt;code&gt;ip(7)&lt;/code&gt;&lt;/a&gt; man page.&lt;/p&gt;
&lt;p&gt;This feature is not specified in POSIX but is available in many operating systems that implement BSD sockets, including Linux.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>PulseAudio under the hood</title>
      <link>http://gavv.net/articles/pulseaudio-under-the-hood/</link>
      <pubDate>Thu, 21 Sep 2017 00:00:00 +0000</pubDate>
      
      <guid>http://gavv.net/articles/pulseaudio-under-the-hood/</guid>
      <description>&lt;img src=&#34;http://gavv.net/articles/pulseaudio-under-the-hood/diagrams/features.png&#34; width=&#34;480px&#34;/&gt;
&lt;p&gt;&lt;b&gt;Table of contents&lt;/b&gt;&lt;/p&gt;
&lt;nav id=&#34;TableOfContents&#34;&gt;
  &lt;ul&gt;
    &lt;li&gt;&lt;a href=&#34;#preface&#34;&gt;Preface&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;&lt;a href=&#34;#about-pulseaudio&#34;&gt;About PulseAudio&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;&lt;a href=&#34;#high-level-components&#34;&gt;High-level components&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;&lt;a href=&#34;#key-abstractions&#34;&gt;Key abstractions&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;&lt;a href=&#34;#d-bus-api&#34;&gt;D-Bus API&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;&lt;a href=&#34;#c-api&#34;&gt;C API&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;&lt;a href=&#34;#protocols-and-networking&#34;&gt;Protocols and networking&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;&lt;a href=&#34;#device-drivers&#34;&gt;Device drivers&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;&lt;a href=&#34;#sound-processing&#34;&gt;Sound processing&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;&lt;a href=&#34;#sample-cache&#34;&gt;Sample cache&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;&lt;a href=&#34;#stream-management&#34;&gt;Stream management&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;&lt;a href=&#34;#time-management&#34;&gt;Time management&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;&lt;a href=&#34;#power-saving&#34;&gt;Power saving&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;&lt;a href=&#34;#automatic-setup-and-routing&#34;&gt;Automatic setup and routing&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;&lt;a href=&#34;#desktop-integrations&#34;&gt;Desktop integrations&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;&lt;a href=&#34;#compatibility-layers&#34;&gt;Compatibility layers&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;&lt;a href=&#34;#server-internals&#34;&gt;Server internals&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;&lt;a href=&#34;#module-list&#34;&gt;Module list&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;&lt;a href=&#34;#gui-tools&#34;&gt;GUI tools&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;&lt;a href=&#34;#command-line-tools&#34;&gt;Command line tools&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;&lt;a href=&#34;#configuration&#34;&gt;Configuration&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;&lt;a href=&#34;#portability&#34;&gt;Portability&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;&lt;a href=&#34;#example-setups&#34;&gt;Example setups&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;&lt;a href=&#34;#example-clients-and-modules&#34;&gt;Example clients and modules&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;&lt;a href=&#34;#critique&#34;&gt;Critique&lt;/a&gt;&lt;/li&gt;
  &lt;/ul&gt;
&lt;/nav&gt;
&lt;hr&gt;
&lt;h1 id=&#34;preface&#34;&gt;
  Preface
  &lt;a class=&#34;anchor&#34; href=&#34;#preface&#34;&gt;
    &lt;i class=&#34;fa fa-hashtag&#34;&gt;&lt;/i&gt;
  &lt;/a&gt;
&lt;/h1&gt;
&lt;p&gt;I&amp;rsquo;m working on the &lt;a href=&#34;https://roc-streaming.org/&#34;&gt;Roc Toolkit&lt;/a&gt; open-source project, a development kit for realtime audio streaming over the network. You can read more about the project in these two articles: &lt;a href=&#34;https://gavv.net/articles/new-network-transport/&#34;&gt;1&lt;/a&gt;, &lt;a href=&#34;https://gavv.net/articles/roc-tutorial/&#34;&gt;2&lt;/a&gt;.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Using MiniSAPServer and MiniSAPListener for SAP/SDP</title>
      <link>http://gavv.net/articles/minisaplistener/</link>
      <pubDate>Fri, 09 Dec 2016 00:00:00 +0000</pubDate>
      
      <guid>http://gavv.net/articles/minisaplistener/</guid>
      <description>&lt;p&gt;&lt;a href=&#34;https://wiki.videolan.org/MiniSAPServer/&#34;&gt;MiniSAPServer&lt;/a&gt; is a small program that periodically sends SAP/SDP messages, given a config file and destination address.&lt;/p&gt;
&lt;p&gt;I&amp;rsquo;ve prepared a complementary &lt;a href=&#34;https://github.com/gavv/MiniSAPListener&#34;&gt;MiniSAPListener&lt;/a&gt; program which listens for SAP/SDP messages, and prints them to stdout or passes to a shell command. The source code is mostly extracted from &lt;a href=&#34;https://www.freedesktop.org/wiki/Software/PulseAudio/&#34;&gt;PulseAudio&lt;/a&gt; RTP receiver.&lt;/p&gt;
&lt;p&gt;To send custom SAP/SDP messages, one should create two configuration files for MiniSAPServer, one with SAP configuration, and another with an SDP message.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>File locking in Linux</title>
      <link>http://gavv.net/articles/file-locks/</link>
      <pubDate>Fri, 29 Jul 2016 00:00:00 +0000</pubDate>
      
      <guid>http://gavv.net/articles/file-locks/</guid>
      <description>&lt;nav id=&#34;TableOfContents&#34;&gt;
&lt;p&gt;&lt;strong&gt;Table of contents&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;#introduction&#34;&gt;Introduction&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;#advisory-locking&#34;&gt;Advisory locking&lt;/a&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;#common-features&#34;&gt;Common features&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;#differing-features&#34;&gt;Differing features&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;#file-descriptors-and-i-nodes&#34;&gt;File descriptors and i-nodes&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;#bsd-locks-flock&#34;&gt;BSD locks (flock)&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;#posix-record-locks-fcntl&#34;&gt;POSIX record locks (fcntl)&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;#lockf-function&#34;&gt;lockf function&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;#open-file-description-locks-fcntl&#34;&gt;Open file description locks (fcntl)&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;#emulating-open-file-description-locks&#34;&gt;Emulating Open file description locks&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;#test-program&#34;&gt;Test program&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;#command-line-tools&#34;&gt;Command-line tools&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;#mandatory-locking&#34;&gt;Mandatory locking&lt;/a&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;#example-usage&#34;&gt;Example usage&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/nav&gt;
&lt;hr&gt;
&lt;h1 id=&#34;introduction&#34;&gt;
  Introduction
  &lt;a class=&#34;anchor&#34; href=&#34;#introduction&#34;&gt;
    &lt;i class=&#34;fa fa-hashtag&#34;&gt;&lt;/i&gt;
  &lt;/a&gt;
&lt;/h1&gt;
&lt;p&gt;&lt;a href=&#34;https://en.wikipedia.org/wiki/File_locking&#34;&gt;File locking&lt;/a&gt; is a mutual-exclusion mechanism for files. Linux supports two major kinds of file locks:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;advisory locks&lt;/li&gt;
&lt;li&gt;mandatory locks&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Below we discuss all lock types available in POSIX and Linux and provide usage examples.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Reusing UNIX domain socket (SO_REUSEADDR for AF_UNIX)</title>
      <link>http://gavv.net/articles/unix-socket-reuse/</link>
      <pubDate>Thu, 07 Jul 2016 00:00:01 +0000</pubDate>
      
      <guid>http://gavv.net/articles/unix-socket-reuse/</guid>
      <description>&lt;p&gt;&lt;a href=&#34;https://en.wikipedia.org/wiki/Unix_domain_socket&#34;&gt;Unix domain sockets&lt;/a&gt; are a networkless version of Internet sockets.&lt;/p&gt;
&lt;p&gt;They have several advantages:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Unix domain sockets are files, so file-system permissions may be used for them&lt;/li&gt;
&lt;li&gt;when one end is closed (e.g. process exits), &lt;code&gt;SIGPIPE&lt;/code&gt; is delivered to another end&lt;/li&gt;
&lt;li&gt;performance may be up to 2x better&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;See details &lt;a href=&#34;http://lists.freebsd.org/pipermail/freebsd-performance/2005-February/001143.html&#34;&gt;here&lt;/a&gt;.&lt;/p&gt;
&lt;h2 id=&#34;lack-of-so_reuseaddr&#34;&gt;
  Lack of SO_REUSEADDR
  &lt;a class=&#34;anchor&#34; href=&#34;#lack-of-so_reuseaddr&#34;&gt;
    &lt;i class=&#34;fa fa-hashtag&#34;&gt;&lt;/i&gt;
  &lt;/a&gt;
&lt;/h2&gt;
&lt;p&gt;A socket file is created by &lt;code&gt;bind(2)&lt;/code&gt; call. If the file already exists, &lt;code&gt;EADDRINUSE&lt;/code&gt; is returned.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Decoding and playing audio files in Linux</title>
      <link>http://gavv.net/articles/decode-play/</link>
      <pubDate>Thu, 07 Jul 2016 00:00:00 +0000</pubDate>
      
      <guid>http://gavv.net/articles/decode-play/</guid>
      <description>&lt;p&gt;&lt;b&gt;Table of contents&lt;/b&gt;&lt;/p&gt;
&lt;nav id=&#34;TableOfContents&#34;&gt;
  &lt;ul&gt;
    &lt;li&gt;&lt;a href=&#34;#overview&#34;&gt;Overview&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;&lt;a href=&#34;#ffmpeg&#34;&gt;FFmpeg&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;&lt;a href=&#34;#sox&#34;&gt;SoX&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;&lt;a href=&#34;#alsa-libasound&#34;&gt;ALSA (libasound)&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;&lt;a href=&#34;#pulseaudio&#34;&gt;PulseAudio&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;&lt;a href=&#34;#libsndfile&#34;&gt;libsndfile&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;&lt;a href=&#34;#other-libraries&#34;&gt;Other libraries&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;&lt;a href=&#34;#notes&#34;&gt;Notes&lt;/a&gt;&lt;/li&gt;
  &lt;/ul&gt;
&lt;/nav&gt;
&lt;hr&gt;
&lt;h1 id=&#34;overview&#34;&gt;
  Overview
  &lt;a class=&#34;anchor&#34; href=&#34;#overview&#34;&gt;
    &lt;i class=&#34;fa fa-hashtag&#34;&gt;&lt;/i&gt;
  &lt;/a&gt;
&lt;/h1&gt;
&lt;p&gt;I was playing with various media libraries recently and have prepared several snippets demonstrating how one can decode and play an audio file in two separate steps.&lt;/p&gt;
&lt;p&gt;The source code is available on GitHub &lt;a href=&#34;https://github.com/gavv/snippets/tree/master/decode_play&#34;&gt;here&lt;/a&gt; and &lt;a href=&#34;https://github.com/gavv/snippets/tree/master/pa&#34;&gt;there&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;The following libraries are used:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;https://www.ffmpeg.org/&#34;&gt;FFmpeg&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;http://sox.sourceforge.net/&#34;&gt;SoX&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;http://www.alsa-project.org/main/index.php/Main_Page&#34;&gt;ALSA&lt;/a&gt; (libasound)&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://www.freedesktop.org/wiki/Software/PulseAudio/&#34;&gt;PulseAudio&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;http://www.mega-nerd.com/libsndfile/&#34;&gt;libsndfile&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Each snippet is a small program. There are two kinds of them:&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>SCons rebuilds generated source files every launch</title>
      <link>http://gavv.net/articles/sconsign-bug/</link>
      <pubDate>Wed, 06 Jul 2016 00:00:00 +0000</pubDate>
      
      <guid>http://gavv.net/articles/sconsign-bug/</guid>
      <description>&lt;h2 id=&#34;problem&#34;&gt;
  Problem
  &lt;a class=&#34;anchor&#34; href=&#34;#problem&#34;&gt;
    &lt;i class=&#34;fa fa-hashtag&#34;&gt;&lt;/i&gt;
  &lt;/a&gt;
&lt;/h2&gt;
&lt;p&gt;In a large project that uses SCons, &lt;a href=&#34;https://bitbucket.org/scons/scons/wiki/VariantDir%28%29&#34;&gt;VariantDir&lt;/a&gt;, and source code generation, happens one of the following:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;generated source files are rebuilt every time when &lt;code&gt;scons&lt;/code&gt; is launched&lt;/li&gt;
&lt;li&gt;if &lt;code&gt;.sconsign.dblite&lt;/code&gt; is removed manually, &lt;code&gt;scons&lt;/code&gt; crashes with the following trace:&lt;/li&gt;
&lt;/ul&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code class=&#34;language-none&#34; data-lang=&#34;none&#34;&gt;OSError: [Errno 2] No such file or directory: &amp;#39;.sconsign.dblite&amp;#39;:
  File &amp;#34;/usr/lib64/python2.7/site-packages/SCons/Script/Main.py&amp;#34;, line 1372:
    _exec_main(parser, values)
  File &amp;#34;/usr/lib64/python2.7/site-packages/SCons/Script/Main.py&amp;#34;, line 1335:
    _main(parser)
  File &amp;#34;/usr/lib64/python2.7/site-packages/SCons/Script/Main.py&amp;#34;, line 1099:
    nodes = _build_targets(fs, options, targets, target_top)
  File &amp;#34;/usr/lib64/python2.7/site-packages/SCons/Script/Main.py&amp;#34;, line 1297:
    jobs.run(postfunc = jobs_postfunc)
  File &amp;#34;/usr/lib64/python2.7/site-packages/SCons/Job.py&amp;#34;, line 113:
    postfunc()
  File &amp;#34;/usr/lib64/python2.7/site-packages/SCons/Script/Main.py&amp;#34;, line 1294:
    SCons.SConsign.write()
  File &amp;#34;/usr/lib64/python2.7/site-packages/SCons/SConsign.py&amp;#34;, line 109:
    syncmethod()
  File &amp;#34;/usr/lib64/python2.7/site-packages/SCons/dblite.py&amp;#34;, line 127:
    self._os_unlink(self._file_name)
Exception OSError: OSError(2, &amp;#39;No such file or directory&amp;#39;) in
  &amp;lt;bound method dblite.__del__ of &amp;lt;SCons.dblite.dblite object at 0x7fa287435c10&amp;gt;&amp;gt; ignored
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Unfortunately, I was unable to reproduce this outside of my project.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Xlib usage examples</title>
      <link>http://gavv.net/articles/xlib-usage-examples/</link>
      <pubDate>Tue, 05 Jul 2016 00:00:01 +0000</pubDate>
      
      <guid>http://gavv.net/articles/xlib-usage-examples/</guid>
      <description>&lt;p&gt;&lt;b&gt;Table of contents&lt;/b&gt;&lt;/p&gt;
&lt;nav id=&#34;TableOfContents&#34;&gt;
  &lt;ul&gt;
    &lt;li&gt;&lt;a href=&#34;#what-is-xlib&#34;&gt;What is Xlib?&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;&lt;a href=&#34;#printing-pressed-keys&#34;&gt;Printing pressed keys&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;&lt;a href=&#34;#embedding-window&#34;&gt;Embedding window&lt;/a&gt;&lt;/li&gt;
  &lt;/ul&gt;
&lt;/nav&gt;
&lt;hr&gt;
&lt;h1 id=&#34;what-is-xlib&#34;&gt;
  What is Xlib?
  &lt;a class=&#34;anchor&#34; href=&#34;#what-is-xlib&#34;&gt;
    &lt;i class=&#34;fa fa-hashtag&#34;&gt;&lt;/i&gt;
  &lt;/a&gt;
&lt;/h1&gt;
&lt;p&gt;&lt;a href=&#34;https://en.wikipedia.org/wiki/Xlib&#34;&gt;Xlib&lt;/a&gt; (also known as libX11) is an X11 client library. It contains functions for interacting with an X server.&lt;/p&gt;
&lt;p&gt;This page provides several code snippets implementing complete X11 programs.&lt;/p&gt;
&lt;hr&gt;
&lt;h1 id=&#34;printing-pressed-keys&#34;&gt;
  Printing pressed keys
  &lt;a class=&#34;anchor&#34; href=&#34;#printing-pressed-keys&#34;&gt;
    &lt;i class=&#34;fa fa-hashtag&#34;&gt;&lt;/i&gt;
  &lt;/a&gt;
&lt;/h1&gt;
&lt;p&gt;The source code is available on GitHub: &lt;a href=&#34;https://github.com/gavv/snippets/blob/master/xlib/xlib_hello.c&#34;&gt;&lt;code&gt;xlib_hello.c&lt;/code&gt;&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;The snippet creates a new window and handles X11 events:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;prints all received events to stdout&lt;/li&gt;
&lt;li&gt;prints pressed keys into a graphical window&lt;/li&gt;
&lt;li&gt;quits when the close button is pressed&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Some documentation that was useful for me:&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Detecting USB devices with libudev</title>
      <link>http://gavv.net/articles/libudev-usb/</link>
      <pubDate>Tue, 05 Jul 2016 00:00:00 +0000</pubDate>
      
      <guid>http://gavv.net/articles/libudev-usb/</guid>
      <description>&lt;p&gt;Below you can find code snippets that match USB devices using libudev.&lt;/p&gt;
&lt;p&gt;A good tutorial is available here: &lt;a href=&#34;http://www.signal11.us/oss/udev/&#34;&gt;libudev and Sysfs Tutorial&lt;/a&gt;.&lt;/p&gt;
&lt;h2 id=&#34;listing-and-monitoring-usb-devices&#34;&gt;
  Listing and monitoring USB devices
  &lt;a class=&#34;anchor&#34; href=&#34;#listing-and-monitoring-usb-devices&#34;&gt;
    &lt;i class=&#34;fa fa-hashtag&#34;&gt;&lt;/i&gt;
  &lt;/a&gt;
&lt;/h2&gt;
&lt;p&gt;The snippet first prints all detected USB devices, and then enters monitoring mode and prints USB devices when they are inserted or removed.&lt;/p&gt;
&lt;p&gt;Source code on GitHub: &lt;a href=&#34;https://github.com/gavv/snippets/blob/master/udev/udev_monitor_usb.c&#34;&gt;&lt;code&gt;udev_monitor_usb.c&lt;/code&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Example output:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;$ ./a.out
usb usb_device exists 1d6b:0001 /dev/bus/usb/002/001
usb usb_device exists 046d:c05b /dev/bus/usb/002/002
usb usb_device exists 1d6b:0001 /dev/bus/usb/003/001
usb usb_device exists 1d6b:0001 /dev/bus/usb/004/001
usb usb_device exists 1d6b:0001 /dev/bus/usb/005/001
usb usb_device exists 1d6b:0002 /dev/bus/usb/001/001
usb usb_device    add 8564:1000 /dev/bus/usb/001/026
usb usb_device remove 0000:0000 /dev/bus/usb/001/026
^C
&lt;/code&gt;&lt;/pre&gt;&lt;h2 id=&#34;listing-usb-storage-devices&#34;&gt;
  Listing USB storage devices
  &lt;a class=&#34;anchor&#34; href=&#34;#listing-usb-storage-devices&#34;&gt;
    &lt;i class=&#34;fa fa-hashtag&#34;&gt;&lt;/i&gt;
  &lt;/a&gt;
&lt;/h2&gt;
&lt;p&gt;The snippet prints detected USB storage devices.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>httpexpect.v1: end-to-end HTTP API testing for Go</title>
      <link>http://gavv.net/articles/httpexpect-v1/</link>
      <pubDate>Mon, 04 Jul 2016 00:00:00 +0000</pubDate>
      
      <guid>http://gavv.net/articles/httpexpect-v1/</guid>
      <description>&lt;p&gt;&lt;code&gt;httpexpect&lt;/code&gt; is a new Go package for end-to-end HTTP and REST API testing.&lt;/p&gt;
&lt;p&gt;It provides convenient chainable helpers for building HTTP request, sending it, and inspecting received HTTP response and its payload.&lt;/p&gt;
&lt;p&gt;Links:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;https://github.com/gavv/httpexpect&#34;&gt;repo on GitHub&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://www.reddit.com/r/golang/comments/4qrhjd/httpexpect_v1_released_endtoend_http_api_testing/&#34;&gt;announcement on Reddit&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The key point is that request construction and response assertions become concise and declarative:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-go&#34; data-lang=&#34;go&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#75715e&#34;&gt;// create httpexpect instance
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#75715e&#34;&gt;&lt;/span&gt;&lt;span style=&#34;color:#a6e22e&#34;&gt;e&lt;/span&gt; &lt;span style=&#34;color:#f92672&#34;&gt;:=&lt;/span&gt; &lt;span style=&#34;color:#a6e22e&#34;&gt;httpexpect&lt;/span&gt;.&lt;span style=&#34;color:#a6e22e&#34;&gt;New&lt;/span&gt;(&lt;span style=&#34;color:#a6e22e&#34;&gt;t&lt;/span&gt;, &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;http://example.com&amp;#34;&lt;/span&gt;)
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#75715e&#34;&gt;// check that &amp;#34;GET /fruits&amp;#34; returns empty JSON array
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#75715e&#34;&gt;&lt;/span&gt;&lt;span style=&#34;color:#a6e22e&#34;&gt;e&lt;/span&gt;.&lt;span style=&#34;color:#a6e22e&#34;&gt;GET&lt;/span&gt;(&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;/fruits&amp;#34;&lt;/span&gt;).
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    &lt;span style=&#34;color:#a6e22e&#34;&gt;Expect&lt;/span&gt;().
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    &lt;span style=&#34;color:#a6e22e&#34;&gt;Status&lt;/span&gt;(&lt;span style=&#34;color:#a6e22e&#34;&gt;http&lt;/span&gt;.&lt;span style=&#34;color:#a6e22e&#34;&gt;StatusOK&lt;/span&gt;).&lt;span style=&#34;color:#a6e22e&#34;&gt;JSON&lt;/span&gt;().&lt;span style=&#34;color:#a6e22e&#34;&gt;Array&lt;/span&gt;().&lt;span style=&#34;color:#a6e22e&#34;&gt;Empty&lt;/span&gt;()
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;You can find more examples in the &lt;a href=&#34;https://github.com/gavv/httpexpect#quick-start&#34;&gt;Quick Start&lt;/a&gt;.&lt;/p&gt;</description>
    </item>
    
  </channel>
</rss>
