Loading...
Searching...
No Matches
music_track.h File Reference

What the phone is playing, as the watch holds it, and taking a new one in. More...

#include <stdbool.h>
#include "wire/wire_caps.g.h"

Go to the source code of this file.

Data Structures

struct  MusicTrack
 One track. Zeroed is nothing playing. More...

Functions

bool music_track_set (MusicTrack *track, const char *title, const char *artist, bool playing)
 Takes in the track the phone sent, and says whether anything changed.
bool music_track_has (const MusicTrack *track)
 Whether there is a track to show, which is a title or an artist.

Detailed Description

What the phone is playing, as the watch holds it, and taking a new one in.

The phone sends MUSIC_TITLE and MUSIC_ARTIST as ASCII text of up to 32 characters, and MUSIC_PLAYING as 1 or 0, all three in one message. Nothing playing is both lines empty and playing off. The text comes off a phone, so a line longer than the buffer is cut to fit and always ends in a terminator.

The sender on the other side is ts/plugin-sources/music.ts, through the now playing feature.