-
Notifications
You must be signed in to change notification settings - Fork 346
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
Provide audio format to pipe output command #3
Provide audio format to pipe output command #3
Conversation
So far, the pipe output of MPD had the problem that the commands in the pipe had no information about the format of the raw audio data sent into the pipe. With this patch mpd substitutes the strings "$MPDPIPE_BITS", "$MPDPIPE_CHANNELS", "$MPDPIPE_RATE", "$MPDPIPE_FORMAT" within the command started for the pipe by the number of bits per sample, the number of channels, the sample rate, and the sample format (one of "S8", "S16", "S24_P32" or "S32"), respectively. Example: if in mpd.conf an audio_output of type pipe contains the line command "/usr/local/bin/mympdpipe $MPDPIPE_BITS $MPDPIPE_CHANNELS $MPDPIPE_RATE $MPDPIPE_FORMAT" then mpd starts a command like /usr/local/bin/mympdpipe 16 2 44100 S16 for this pipe.
Various people seem to use a patched version of MPD to resolve the problem of missing information about the audio format within the pipe command. A very similar patch like this one was for example proposed here: |
Wrong indentation, excessive use of |
I'm fine with suggestions for better solutions. But why is this request closed? Are you going to implement a better solution of the problem addressed here? Or are you not interested in solving this problem (which prevents people from using mpd together with any processing of the audio data, e.g., a filter for room correction)? |
The pipe output is the wrong tool to apply filters, so your example doesn't convince me that this is necessary at all. And no, I'm not going to implement this - there are tons of other things with a higher priority, and the pipe plugin has no priority at all for me. I told you how I'd do it, if ever, and that would be how I'd accept a pull request. |
So far, the pipe output of MPD had the problem that the commands
in the pipe had no information about the format of the raw audio data
sent into the pipe.
With this patch mpd substitutes the strings "$MPDPIPE_BITS",
"$MPDPIPE_CHANNELS", "$MPDPIPE_RATE", "$MPDPIPE_FORMAT"
within the command started for the pipe by the number of bits per sample,
the number of channels, the sample rate, and the sample format (one of
"S8", "S16", "S24_P32" or "S32"), respectively.
Example: if in mpd.conf an audio_output of type pipe contains the line
then mpd starts a command like
/usr/local/bin/mympdpipe 16 2 44100 S16
for this pipe.