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

Audio output via stdout and UDP #440

Open
wants to merge 14 commits into
base: dev
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,10 @@
>
> Add: "FX25TX 1" (or 16 or 32 or 64)

- stdout is now supported for audio output via piping to other utilities. To support this, all non-audio output must be redirected to stderr using the new -O option on the command line.

- udp audio output is also now supported. Use udp:destination:port style output device in the configuration file.



### Bugs Fixed: ###
Expand Down
23 changes: 19 additions & 4 deletions conf/generic.conf
Original file line number Diff line number Diff line change
Expand Up @@ -132,10 +132,15 @@
%W%# "stdin" is not an audio device. Don't use this unless you
%W%# understand what this means. Read the User Guide.
%W%# You can also specify "UDP:" and an optional port for input.
%W%# Something different must be specified for output.
%W%# "-" or "stdout" can be used to pipe audio out to another application.
%W%# The -O option must be specified on the command line to support this.
%W%# For UDP output, specify the destination IP address/hostname and port number
%W%# using "UDP:destination:port" syntax
%W%
%W%# ADEVICE stdin 0
%W%# ADEVICE UDP:7355 0
%W%# ADEVICE UDP:7355 UDP:localhost:7356
%W%# ADEVICE stdin stdout
%W%
%W%# The position in the list can change when devices (e.g. USB) are added and removed.
%W%# You can also specify devices by using part of the name.
Expand All @@ -158,10 +163,15 @@
%L%# "stdin" is not an audio device. Don't use this unless you
%L%# understand what this means. Read the User Guide.
%L%# You can also specify "UDP:" and an optional port for input.
%L%# Something different must be specified for output.
%L%# "-" or "stdout" can be used to pipe audio out to another application.
%L%# The -O option must be specified on the command line to support this.
%L%# For UDP output, specify the destination IP address/hostname and port number
%L%# using "UDP:destination:port" syntax
%L%
%L%# ADEVICE stdin plughw:1,0
%L%# ADEVICE UDP:7355 default
%L%# ADEVICE UDP:7355 UDP:localhost:7356
%L%# ADEVICE stdin stdout
%L%
%R% ---------- Mac ----------
%R%
Expand All @@ -183,9 +193,14 @@
%M%# "stdin" is not an audio device. Don't use this unless you
%M%# understand what this means. Read the User Guide.
%M%# You can also specify "UDP:" and an optional port for input.
%M%# Something different must be specified for output.
%M%# "-" or "stdout" can be used to pipe audio out to another application.
%M%# The -O option must be specified on the command line to support this.
%M%# For UDP output, specify the destination IP address/hostname and port number
%M%# using "UDP:destination:port" syntax
%M%
%M%# ADEVICE UDP:7355 default
%M%# ADEVICE UDP:7355 UDP:localhost:7356
%M%# ADEVICE stdin stdout
%M%#
%C%
%C%#
Expand Down Expand Up @@ -607,4 +622,4 @@
%C%#TTERR NO_CALL SPEECH No call or object name.
%C%#TTERR SATSQ SPEECH Satellite square must be 4 digits.
%C%#TTERR SUFFIX_NO_CALL SPEECH Send full call before using suffix.
%C%
%C%
3 changes: 3 additions & 0 deletions man/direwolf.1
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,9 @@ x = Silence FX.25 information.
.BI "-t " "n"
Text colors. 0=disabled. 1=default. 2,3,4,... alternatives. Use 9 to test compatibility with your terminal.

.TP
.BI "-O "
Redirects all printed output to stderr so stdout can be used as audio device.

.TP
.B "-p "
Expand Down
1 change: 1 addition & 0 deletions src/aprs_tt.c
Original file line number Diff line number Diff line change
Expand Up @@ -2078,6 +2078,7 @@ static void check_result (void)

int main (int argc, char *argv[])
{
text_color_init (1, 0);
aprs_tt_init (NULL, 0);

error_count = 0;
Expand Down
2 changes: 1 addition & 1 deletion src/atest.c
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ int main (int argc, char *argv[])
}
#endif

text_color_init(1);
text_color_init(1, 0);
text_color_set(DW_COLOR_INFO);

/*
Expand Down
Loading