Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 3 commits into from
Feb 3, 2024

Conversation

mmitch
Copy link
Owner

@mmitch mmitch commented Feb 3, 2024

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

I have implemented this for these audio backends:

  • plugout_pipewire
  • plugout_pulse
  • plugout_sdl (metadata is passed through to the audio backend SDL is using; whether it is shown depends on the chosen backend. PipeWire and PulseAudio should both work)

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.

PulseAudio and PipeWire (and SDL when using one of those two as
backends) provide a metadata field in the audio stream for the stream
name.

Don't just hardcode `gbsplay` as the stream name but show which file
is currently playing instead.
PulseAudio and PipeWire (and SDL when using one of those two as
backends) provide a metadata field in the audio client connection for
the application name.

Don't just hardcode `gbsplay` as the application name but distinguish
between gbsplay and xgbsplay.
@mmitch mmitch added this to the 0.0.96 milestone Feb 3, 2024
@mmitch mmitch requested review from mrehkopf and ranma February 3, 2024 14:50
Copy link

codecov bot commented Feb 3, 2024

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 Coverage Δ
player.c 41.63% <100.00%> (+0.40%) ⬆️
plugout_alsa.c 0.00% <ø> (ø)
plugout_devdsp.c 0.00% <ø> (ø)
plugout_nas.c 0.00% <ø> (ø)
plugout_stdout.c 100.00% <ø> (ø)
plugout_vgm.c 0.00% <ø> (ø)
plugout_wav.c 0.00% <ø> (ø)
midifile.c 0.00% <0.00%> (ø)
plugout_iodumper.c 0.00% <0.00%> (ø)
plugout_pulse.c 0.00% <0.00%> (ø)

@ranma ranma merged commit a07849b into master Feb 3, 2024
20 checks passed
@mmitch mmitch deleted the named-streams branch February 4, 2024 09:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants