mmitch / gbsplay

gameboy sound player
https://mmitch.github.io/gbsplay/
Other
98 stars 19 forks source link

add application name and currently playing file to audio streams #112

Closed mmitch closed 5 months ago

mmitch commented 5 months ago

Set audio metadata to make application name and currently playing file available to other applications, eg. let pavucontrol (PulseAudio mixer app) show this ( :eye: bottom row): image

I have implemented this for these audio backends:

This might be added to other plugouts, too, but I don't know of they support meta data.

Theoretically we could also use plugout_skip_fn to append the currently playing subsong, but I did not implement this because for both PipeWire and Pulseaudio we would have to update from their "simple" stream access methods to a full-blown client implementation to be able to switch stream metadata on the fly. This would be quite a rewrite of both plugouts and I did not want to do that.

As the current filename now is available in the plugouts, we could use it in file writing operations (MIDI, VGM or WAV plugouts using file_open() from `filewriter.c) in the future.

codecov[bot] commented 5 months ago

Codecov Report

Attention: 3 lines in your changes are missing coverage. Please review.

Comparison is base (249f263) 45.86% compared to head (ad06030) 45.90%.

Additional details and impacted files | [Files](https://app.codecov.io/gh/mmitch/gbsplay/pull/112?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Christian+Garbs) | Coverage Δ | | |---|---|---| | [player.c](https://app.codecov.io/gh/mmitch/gbsplay/pull/112?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Christian+Garbs#diff-cGxheWVyLmM=) | `41.63% <100.00%> (+0.40%)` | :arrow_up: | | [plugout\_alsa.c](https://app.codecov.io/gh/mmitch/gbsplay/pull/112?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Christian+Garbs#diff-cGx1Z291dF9hbHNhLmM=) | `0.00% <ø> (ø)` | | | [plugout\_devdsp.c](https://app.codecov.io/gh/mmitch/gbsplay/pull/112?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Christian+Garbs#diff-cGx1Z291dF9kZXZkc3AuYw==) | `0.00% <ø> (ø)` | | | [plugout\_nas.c](https://app.codecov.io/gh/mmitch/gbsplay/pull/112?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Christian+Garbs#diff-cGx1Z291dF9uYXMuYw==) | `0.00% <ø> (ø)` | | | [plugout\_stdout.c](https://app.codecov.io/gh/mmitch/gbsplay/pull/112?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Christian+Garbs#diff-cGx1Z291dF9zdGRvdXQuYw==) | `100.00% <ø> (ø)` | | | [plugout\_vgm.c](https://app.codecov.io/gh/mmitch/gbsplay/pull/112?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Christian+Garbs#diff-cGx1Z291dF92Z20uYw==) | `0.00% <ø> (ø)` | | | [plugout\_wav.c](https://app.codecov.io/gh/mmitch/gbsplay/pull/112?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Christian+Garbs#diff-cGx1Z291dF93YXYuYw==) | `0.00% <ø> (ø)` | | | [midifile.c](https://app.codecov.io/gh/mmitch/gbsplay/pull/112?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Christian+Garbs#diff-bWlkaWZpbGUuYw==) | `0.00% <0.00%> (ø)` | | | [plugout\_iodumper.c](https://app.codecov.io/gh/mmitch/gbsplay/pull/112?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Christian+Garbs#diff-cGx1Z291dF9pb2R1bXBlci5j) | `0.00% <0.00%> (ø)` | | | [plugout\_pulse.c](https://app.codecov.io/gh/mmitch/gbsplay/pull/112?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Christian+Garbs#diff-cGx1Z291dF9wdWxzZS5j) | `0.00% <0.00%> (ø)` | |