Originally Posted By: tfabris
When the player is paused, the Z (source) and D (duration) data do not come out the serial port for the current track, they come out the serial port for the next track.


Yeah, that makes sense. The code that outputs them doesn't have its own thread, so it cannot output anything until the next time the player sends something (anything) out the serial port. So this is only an issue WHILE PAUSED, right? If the player is actively playing, the data should arrive within a second or two. I will rearrange it to come out regardless while paused, but I do need you to confirm the current behaviour. Thanks.

Quote:
When the player wakes from sleep or the player has recovered from a low voltage event, this is a fresh reboot of the Arduino and the Bluetooth chip.

Right. So we need a way to get you a complete set of track data then. I'll work on that. Most likely, we'll just have the code send a request in on the serial port, and the result will be a full dump of track data back out.

Quote:
my code having to flag the host stereo for every line of new track data.


That is a problem. I suppose one simple solution would be to hold back all of the track data until it has all been retrieved. Or to always output the final line ('D' Duration) so you can trigger from that. This would delay updates of the headunit display for 1-5 seconds, depending on how busy/slow the hard drive is. That's because the slow part here is reading the tag file to get the Source and Duration fields. Everything else is available instantly.

Going back to dedup won't be any better for this one, other than bombarding the serial port buffers much more heavily and overflowing.

The funny thing is, hardly none of this matters for the eventual internal implementation. The full track data is always readable from /proc/empeg_notify, and it should even be possible to use poll() or select() to be auto-notified whenever it gets updated. smile But that doesn't really help with the external Arduino thing.

Cheers


Edited by mlord (15/12/2017 14:05)