<feed xmlns='http://www.w3.org/2005/Atom'>
<title>soundbox-go/soundbox, 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:16:57Z</updated>
<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>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>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>Make soundbox package top-level</title>
<updated>2024-10-01T20:20:47Z</updated>
<author>
<name>xegineering</name>
<email>me@xegineering.eu</email>
</author>
<published>2024-10-01T20:20:47Z</published>
<link rel='alternate' type='text/html' href='https://cgit.xengineering.eu/soundbox-go/commit/?id=3fc713ccfcc96738d981a97647a84a6cb6bbec04'/>
<id>urn:sha1:3fc713ccfcc96738d981a97647a84a6cb6bbec04</id>
<content type='text'>
It is not expected that this library will be so big that multiple
packages make sense. Thus it should start only with the main package.
</content>
</entry>
<entry>
<title>Add minimal soundbox Go package</title>
<updated>2024-10-01T19:44:47Z</updated>
<author>
<name>xegineering</name>
<email>me@xegineering.eu</email>
</author>
<published>2024-10-01T19:44:47Z</published>
<link rel='alternate' type='text/html' href='https://cgit.xengineering.eu/soundbox-go/commit/?id=c472e5c7dee2e1cb16e297b23726a714521e8e0b'/>
<id>urn:sha1:c472e5c7dee2e1cb16e297b23726a714521e8e0b</id>
<content type='text'>
This only adds the `Soundbox` struct type which has a `net.HardwareAddr`
to identify it together with a constructor and a unit test.
</content>
</entry>
</feed>
