<feed xmlns='http://www.w3.org/2005/Atom'>
<title>soundbox-go, branch v0.1.5</title>
<subtitle>Go library to interface with soundbox devices</subtitle>
<id>https://cgit.xengineering.eu/soundbox-go/atom?h=v0.1.5</id>
<link rel='self' href='https://cgit.xengineering.eu/soundbox-go/atom?h=v0.1.5'/>
<link rel='alternate' type='text/html' href='https://cgit.xengineering.eu/soundbox-go/'/>
<updated>2024-11-29T09:21:31Z</updated>
<entry>
<title>Update CHANGELOG.md for version 0.1.5</title>
<updated>2024-11-29T09:21:31Z</updated>
<author>
<name>xegineering</name>
<email>me@xegineering.eu</email>
</author>
<published>2024-11-29T09:21:31Z</published>
<link rel='alternate' type='text/html' href='https://cgit.xengineering.eu/soundbox-go/commit/?id=4513eb614707d129824e60270bd45cdee9f04d06'/>
<id>urn:sha1:4513eb614707d129824e60270bd45cdee9f04d06</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Refactor streamContext()</title>
<updated>2024-11-29T09:16:57Z</updated>
<author>
<name>xegineering</name>
<email>me@xegineering.eu</email>
</author>
<published>2024-11-29T09:16:57Z</published>
<link rel='alternate' type='text/html' href='https://cgit.xengineering.eu/soundbox-go/commit/?id=f5f0d12b697e71e67a403791c1b93ffdf61e272a'/>
<id>urn:sha1:f5f0d12b697e71e67a403791c1b93ffdf61e272a</id>
<content type='text'>
This avoids an unnecessary additional for loop.
</content>
</entry>
<entry>
<title>Handle internal error correctly</title>
<updated>2024-11-29T09:06:01Z</updated>
<author>
<name>xegineering</name>
<email>me@xegineering.eu</email>
</author>
<published>2024-11-29T09:06:01Z</published>
<link rel='alternate' type='text/html' href='https://cgit.xengineering.eu/soundbox-go/commit/?id=97af30e8fee2274a437a13d8c2c19e4bfe29ddee'/>
<id>urn:sha1:97af30e8fee2274a437a13d8c2c19e4bfe29ddee</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Fix variable buffer size</title>
<updated>2024-11-29T08:16:57Z</updated>
<author>
<name>xegineering</name>
<email>me@xegineering.eu</email>
</author>
<published>2024-11-29T08:16:57Z</published>
<link rel='alternate' type='text/html' href='https://cgit.xengineering.eu/soundbox-go/commit/?id=49dc5ae3c12f2c696302171b54b130d94dea05e0'/>
<id>urn:sha1:49dc5ae3c12f2c696302171b54b130d94dea05e0</id>
<content type='text'>
The switch to `io.Copy()` to pump the data to the soundbox devices
removed the control over the buffer size of this copy action.

While for generic copy actions it is even an advantage when a big buffer
is used this is a problem for the soundbox use case. A big buffer used
during copy means that the first soundbox device gets audio data
significantly earlier than the later ones since `io.MultiWriter()` works
sequentially.

Thus this commit switches to `io.CopyBuffer()` where a buffer has to
provided. For that purpose the same buffer size is used as before the
refactoring to use `io.Copy()`.
</content>
</entry>
<entry>
<title>Replace custom code by io package functions</title>
<updated>2024-11-28T21:44:28Z</updated>
<author>
<name>xegineering</name>
<email>me@xegineering.eu</email>
</author>
<published>2024-11-28T21:44:28Z</published>
<link rel='alternate' type='text/html' href='https://cgit.xengineering.eu/soundbox-go/commit/?id=99031596efbcf004188217d2a9e53ac5ce33b511'/>
<id>urn:sha1:99031596efbcf004188217d2a9e53ac5ce33b511</id>
<content type='text'>
This makes use of two functions from this package:

- io.Copy()
- io.MultiWriter()

`io.Copy()` is used to move the data from whatever reader is provided.
`io.Multiwriter()` solves the issue that we need to stream to multiple
network connections at the same time (one for each soundbox).
</content>
</entry>
<entry>
<title>Handle read error after processing buffer</title>
<updated>2024-11-27T20:55:40Z</updated>
<author>
<name>xegineering</name>
<email>me@xegineering.eu</email>
</author>
<published>2024-11-27T20:55:40Z</published>
<link rel='alternate' type='text/html' href='https://cgit.xengineering.eu/soundbox-go/commit/?id=bb84332ef7ca114f0c608bbea7f11451f010a831'/>
<id>urn:sha1:bb84332ef7ca114f0c608bbea7f11451f010a831</id>
<content type='text'>
This is recommended by the Go standard library. One reason is that a
Reader might deliver the last couple of bytes together with the EOF
error. This is only handled correctly if the returned bytes are
processed first and the error is handled later.

[1]: https://pkg.go.dev/io#Reader
</content>
</entry>
<entry>
<title>Introduce io.Reader-based streamContext()</title>
<updated>2024-11-27T20:38:16Z</updated>
<author>
<name>xegineering</name>
<email>me@xegineering.eu</email>
</author>
<published>2024-11-27T20:29:39Z</published>
<link rel='alternate' type='text/html' href='https://cgit.xengineering.eu/soundbox-go/commit/?id=6b7da29eea100b92659a3f1f5df6958ebad544c8'/>
<id>urn:sha1:6b7da29eea100b92659a3f1f5df6958ebad544c8</id>
<content type='text'>
This prepares the switch to adding more sources than web URLs.
Everything providing an io.Reader can then simply use this internal
function in the background to avoid code duplication.
</content>
</entry>
<entry>
<title>Fix streaming only via first interface candidate</title>
<updated>2024-11-17T11:48:00Z</updated>
<author>
<name>xegineering</name>
<email>me@xegineering.eu</email>
</author>
<published>2024-11-17T11:45:35Z</published>
<link rel='alternate' type='text/html' href='https://cgit.xengineering.eu/soundbox-go/commit/?id=d4cf5ed8e38d1e5d0b8110e8959e002c216f073f'/>
<id>urn:sha1:d4cf5ed8e38d1e5d0b8110e8959e002c216f073f</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Update CHANGELOG.md for version 0.1.4</title>
<updated>2024-11-10T15:40:19Z</updated>
<author>
<name>xegineering</name>
<email>me@xegineering.eu</email>
</author>
<published>2024-11-10T15:40:19Z</published>
<link rel='alternate' type='text/html' href='https://cgit.xengineering.eu/soundbox-go/commit/?id=a95013aa0813d1644aa15780f360fa4dad2223a8'/>
<id>urn:sha1:a95013aa0813d1644aa15780f360fa4dad2223a8</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Add CHANGELOG.md</title>
<updated>2024-11-10T15:36:26Z</updated>
<author>
<name>xegineering</name>
<email>me@xegineering.eu</email>
</author>
<published>2024-11-10T15:36:26Z</published>
<link rel='alternate' type='text/html' href='https://cgit.xengineering.eu/soundbox-go/commit/?id=6f51073ecb44f5476e37e3d5ab8d87e917116bae'/>
<id>urn:sha1:6f51073ecb44f5476e37e3d5ab8d87e917116bae</id>
<content type='text'>
This keeps track of the changes to this repository.
</content>
</entry>
<entry>
<title>Avoid unnecessary variable for args</title>
<updated>2024-11-10T14:54:59Z</updated>
<author>
<name>xegineering</name>
<email>me@xegineering.eu</email>
</author>
<published>2024-11-10T14:54:59Z</published>
<link rel='alternate' type='text/html' href='https://cgit.xengineering.eu/soundbox-go/commit/?id=93d3ce8ca7d335fb15da64981321f82891c1493c'/>
<id>urn:sha1:93d3ce8ca7d335fb15da64981321f82891c1493c</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Use Go code for output network stream</title>
<updated>2024-11-10T14:53:44Z</updated>
<author>
<name>xegineering</name>
<email>me@xegineering.eu</email>
</author>
<published>2024-11-08T19:56:56Z</published>
<link rel='alternate' type='text/html' href='https://cgit.xengineering.eu/soundbox-go/commit/?id=36a2fda37e837bc39c88a2fa38678b0f3bded041'/>
<id>urn:sha1:36a2fda37e837bc39c88a2fa38678b0f3bded041</id>
<content type='text'>
Calling the external program `ffmpeg` should be avoided completely in
the future to make soundbox-go a pure Go code base. `ffmpeg` provides
the following functionality to soundbox-go:

- web radio input stream transport
- re-encoding of the audio stream
- output stream transport to soundbox devices

The last part should be replaced with this commit as a first step.
</content>
</entry>
<entry>
<title>Rename cmd to args</title>
<updated>2024-11-08T19:35:24Z</updated>
<author>
<name>xegineering</name>
<email>me@xegineering.eu</email>
</author>
<published>2024-11-08T19:35:24Z</published>
<link rel='alternate' type='text/html' href='https://cgit.xengineering.eu/soundbox-go/commit/?id=e30a1b0768d35ec70e5d2c00e6ae87c0f267b881'/>
<id>urn:sha1:e30a1b0768d35ec70e5d2c00e6ae87c0f267b881</id>
<content type='text'>
This variable only contains the arguments for the called program. Thus
it should be named like this.
</content>
</entry>
<entry>
<title>Fix outdated README.md</title>
<updated>2024-10-31T21:37:26Z</updated>
<author>
<name>xegineering</name>
<email>me@xegineering.eu</email>
</author>
<published>2024-10-31T21:37:26Z</published>
<link rel='alternate' type='text/html' href='https://cgit.xengineering.eu/soundbox-go/commit/?id=702c39c9bb3a6441de366aa30842960741017615'/>
<id>urn:sha1:702c39c9bb3a6441de366aa30842960741017615</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Change module name and restructure content</title>
<updated>2024-10-31T21:10:36Z</updated>
<author>
<name>xegineering</name>
<email>me@xegineering.eu</email>
</author>
<published>2024-10-31T21:10:36Z</published>
<link rel='alternate' type='text/html' href='https://cgit.xengineering.eu/soundbox-go/commit/?id=79eeb90079e417f0a9d040c1de8f3278c628810f'/>
<id>urn:sha1:79eeb90079e417f0a9d040c1de8f3278c628810f</id>
<content type='text'>
The repository names for soundbox are named as below:

- app: soundbox-app
- Go library module: soundbox-go
- Device: soundbox

The Go module names were:

- app: xengineering.eu/soundbox/app
- Go library module: xengineering.eu/soundbox

This does not make clear which module is related to which repository
since the names are different. Thus it should be changed to:

- app: xengineering.eu/soundbox-app
- Go library module: xengineering.eu/soundbox-go

The import statement for the library is then:

    import "xengineering.eu/soundbox-go/soundbox"

This is a bit longer but it keeps the property that the library is
referenced inside the code by the simple name `soundbox`.
</content>
</entry>
<entry>
<title>Move streaming example to stream_test.go</title>
<updated>2024-10-06T16:06:29Z</updated>
<author>
<name>xegineering</name>
<email>me@xegineering.eu</email>
</author>
<published>2024-10-06T16:06:29Z</published>
<link rel='alternate' type='text/html' href='https://cgit.xengineering.eu/soundbox-go/commit/?id=cbcebb47e515f900f2505098f0ce87697e2fe283'/>
<id>urn:sha1:cbcebb47e515f900f2505098f0ce87697e2fe283</id>
<content type='text'>
This example is completely based on the StreamURLContext() function.
Thus it should go to the respective test file.
</content>
</entry>
<entry>
<title>Add missing doc string to public function</title>
<updated>2024-10-06T15:58:34Z</updated>
<author>
<name>xegineering</name>
<email>me@xegineering.eu</email>
</author>
<published>2024-10-06T15:58:34Z</published>
<link rel='alternate' type='text/html' href='https://cgit.xengineering.eu/soundbox-go/commit/?id=735a7863845da130e6c727136aac75c2e7bf23da'/>
<id>urn:sha1:735a7863845da130e6c727136aac75c2e7bf23da</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Add soundbox.StreamURLContext()</title>
<updated>2024-10-03T18:00:04Z</updated>
<author>
<name>xegineering</name>
<email>me@xegineering.eu</email>
</author>
<published>2024-10-03T17:16:56Z</published>
<link rel='alternate' type='text/html' href='https://cgit.xengineering.eu/soundbox-go/commit/?id=b8fed490c275487f14bff4f5b49a6072d27e5b5f'/>
<id>urn:sha1:b8fed490c275487f14bff4f5b49a6072d27e5b5f</id>
<content type='text'>
This should be the primary public API of the library to stream web radio
to soundbox devices.
</content>
</entry>
<entry>
<title>Remove soundbox.Client</title>
<updated>2024-10-03T18:00:04Z</updated>
<author>
<name>xegineering</name>
<email>me@xegineering.eu</email>
</author>
<published>2024-10-03T16:56:14Z</published>
<link rel='alternate' type='text/html' href='https://cgit.xengineering.eu/soundbox-go/commit/?id=9b995e02371e45e8cb5806ee7c7eb8139bf24fd8'/>
<id>urn:sha1:9b995e02371e45e8cb5806ee7c7eb8139bf24fd8</id>
<content type='text'>
This data structure only contained a net.HardwareAddr and did not
provide much more useful functionality. Thus the net.HardwareAddr type
should be used directly.
</content>
</entry>
<entry>
<title>Make soundbox.StreamingPort private</title>
<updated>2024-10-03T18:00:04Z</updated>
<author>
<name>xegineering</name>
<email>me@xegineering.eu</email>
</author>
<published>2024-10-03T16:49:04Z</published>
<link rel='alternate' type='text/html' href='https://cgit.xengineering.eu/soundbox-go/commit/?id=d246a58cb4473c7a311d99232a18057544219a9b'/>
<id>urn:sha1:d246a58cb4473c7a311d99232a18057544219a9b</id>
<content type='text'>
It is planned to provide a function for streaming. Thus the streaming
port is not required to be exposed. If there is a use case the streaming
port can be exposed again.
</content>
</entry>
<entry>
<title>Add soundbox.getInterface()</title>
<updated>2024-10-03T18:00:04Z</updated>
<author>
<name>xegineering</name>
<email>me@xegineering.eu</email>
</author>
<published>2024-10-03T15:28:10Z</published>
<link rel='alternate' type='text/html' href='https://cgit.xengineering.eu/soundbox-go/commit/?id=56f3e2c3f47e796333d4de2502385a5ef27d049f'/>
<id>urn:sha1:56f3e2c3f47e796333d4de2502385a5ef27d049f</id>
<content type='text'>
This is required as a temporary solution to guess the correct interface.
</content>
</entry>
<entry>
<title>Rename Port to StreamingPort</title>
<updated>2024-10-02T19:55:24Z</updated>
<author>
<name>xegineering</name>
<email>me@xegineering.eu</email>
</author>
<published>2024-10-02T19:53:51Z</published>
<link rel='alternate' type='text/html' href='https://cgit.xengineering.eu/soundbox-go/commit/?id=9c81db35038fa96de6b3fda0695a463bbf69ac01'/>
<id>urn:sha1:9c81db35038fa96de6b3fda0695a463bbf69ac01</id>
<content type='text'>
It is expected that further ports (maybe for information via HTTP) are
added in the future.

To keep the public API stable this should be taken into account before
the first release.
</content>
</entry>
<entry>
<title>Fix example documentation</title>
<updated>2024-10-02T19:43:11Z</updated>
<author>
<name>xegineering</name>
<email>me@xegineering.eu</email>
</author>
<published>2024-10-02T19:43:11Z</published>
<link rel='alternate' type='text/html' href='https://cgit.xengineering.eu/soundbox-go/commit/?id=b6fa67af2c4478b99408bf919ba76a38400ee8d6'/>
<id>urn:sha1:b6fa67af2c4478b99408bf919ba76a38400ee8d6</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Rename Soundbox to Client</title>
<updated>2024-10-02T19:18:51Z</updated>
<author>
<name>xegineering</name>
<email>me@xegineering.eu</email>
</author>
<published>2024-10-02T19:18:51Z</published>
<link rel='alternate' type='text/html' href='https://cgit.xengineering.eu/soundbox-go/commit/?id=07741b358ba75350e7be36ee76f45afa18b0461b'/>
<id>urn:sha1:07741b358ba75350e7be36ee76f45afa18b0461b</id>
<content type='text'>
Since the module name is `soundbox` naming the primary type of the
module also `Soundbox` is redundant. Following similar code from the Go
standard library this struct is renamed to `Client`.
</content>
</entry>
<entry>
<title>Fix check.py as pre-commit hook</title>
<updated>2024-10-02T19:00:25Z</updated>
<author>
<name>xegineering</name>
<email>me@xegineering.eu</email>
</author>
<published>2024-10-02T19:00:25Z</published>
<link rel='alternate' type='text/html' href='https://cgit.xengineering.eu/soundbox-go/commit/?id=cdd23b4b0a7c14dba738f035e75ac640f1ca3e85'/>
<id>urn:sha1:cdd23b4b0a7c14dba738f035e75ac640f1ca3e85</id>
<content type='text'>
The file did not work properly if used via Git commit hook symlink.
</content>
</entry>
<entry>
<title>Add basic check.py</title>
<updated>2024-10-02T18:54:25Z</updated>
<author>
<name>xegineering</name>
<email>me@xegineering.eu</email>
</author>
<published>2024-10-02T18:51:53Z</published>
<link rel='alternate' type='text/html' href='https://cgit.xengineering.eu/soundbox-go/commit/?id=cdb89bfc9705bdee18a6893d1bb2678f6b8b7edd'/>
<id>urn:sha1:cdb89bfc9705bdee18a6893d1bb2678f6b8b7edd</id>
<content type='text'>
This script should be usable as a Git pre-commit hook to make sure every
commit has a running test suite and is well formatted.

This commit starts with running the test suite for the module.
</content>
</entry>
<entry>
<title>Add basic example</title>
<updated>2024-10-02T17:59:59Z</updated>
<author>
<name>xegineering</name>
<email>me@xegineering.eu</email>
</author>
<published>2024-10-02T17:59:59Z</published>
<link rel='alternate' type='text/html' href='https://cgit.xengineering.eu/soundbox-go/commit/?id=8db6c63f1bd3d4dc54dddbacf411ae6a9f33f6de'/>
<id>urn:sha1:8db6c63f1bd3d4dc54dddbacf411ae6a9f33f6de</id>
<content type='text'>
This gives a brief introduction how the library should be used.
Furthermore it has an output string comment making sure with the test
suite that it actually works.
</content>
</entry>
<entry>
<title>Add soundbox.fromHardwareAddr()</title>
<updated>2024-10-02T16:47:34Z</updated>
<author>
<name>xegineering</name>
<email>me@xegineering.eu</email>
</author>
<published>2024-10-02T16:46:50Z</published>
<link rel='alternate' type='text/html' href='https://cgit.xengineering.eu/soundbox-go/commit/?id=516fa4b31da2f2a004e1c7f309c1e34803d18555'/>
<id>urn:sha1:516fa4b31da2f2a004e1c7f309c1e34803d18555</id>
<content type='text'>
This splits the soundbox.NewSoundbox() function into two smaller
functions.
</content>
</entry>
<entry>
<title>Use testing.Fatalf() to log in tests</title>
<updated>2024-10-02T14:57:10Z</updated>
<author>
<name>xegineering</name>
<email>me@xegineering.eu</email>
</author>
<published>2024-10-02T14:57:10Z</published>
<link rel='alternate' type='text/html' href='https://cgit.xengineering.eu/soundbox-go/commit/?id=da21e83c58b3bbc389d8919e9ca5e865e45f2751'/>
<id>urn:sha1:da21e83c58b3bbc389d8919e9ca5e865e45f2751</id>
<content type='text'>
Using testing.Errorf() does not stop the test. This was never wanted.
</content>
</entry>
<entry>
<title>Add soundbox.toLinkLocal()</title>
<updated>2024-10-02T14:53:49Z</updated>
<author>
<name>xegineering</name>
<email>me@xegineering.eu</email>
</author>
<published>2024-10-02T14:53:49Z</published>
<link rel='alternate' type='text/html' href='https://cgit.xengineering.eu/soundbox-go/commit/?id=bc29b4a8b4629a9ef0d335325612a02a6c07b4e8'/>
<id>urn:sha1:bc29b4a8b4629a9ef0d335325612a02a6c07b4e8</id>
<content type='text'>
To communicate with soundbox devices it is required to convert the known
device MAC address (printed on the case) to an IPv6 link-local address.
</content>
</entry>
</feed>
