UDP Audio Output -- Clarify and Add Example;
This commit is contained in:
parent
927df66e9a
commit
c840544d25
|
|
@ -223,3 +223,13 @@ francis@12coresx:~$ ffmpeg -f pulse -i 0 -c:a libmp3lame -ab 64k -f mp3 icecast:
|
|||
|
||||
|
||||
```
|
||||
|
||||
## Sending Audio to UDP Target/Port
|
||||
|
||||
Audio can be sent to a target address on your local area network with the UDP blaster using the `-o udp:targetaddress:port` option.
|
||||
|
||||
Example:
|
||||
`dsd-fme -fs -o udp:192.168.7.8:23470`
|
||||
|
||||
Receiving End:
|
||||
`socat stdio udp-listen:23470 | play -q -b 16 -r 8000 -c2 -t s16 -`
|
||||
|
|
@ -678,7 +678,7 @@ initOpts (dsd_opts * opts)
|
|||
//UDP Socket Blaster Audio
|
||||
opts->udp_sockfd = 0;
|
||||
opts->udp_portno = 23456; //default port, same os OP25's sockaudio.py
|
||||
sprintf (opts->udp_hostname, "%s", "0.0.0.0");
|
||||
sprintf (opts->udp_hostname, "%s", "127.0.0.1");
|
||||
|
||||
//tcp input options
|
||||
opts->tcp_sockfd = 0;
|
||||
|
|
@ -1203,8 +1203,8 @@ usage ()
|
|||
printf (" /dev/dsp for OSS audio (Depreciated: Will require padsp wrapper in Linux) \n");
|
||||
#endif
|
||||
printf (" null for no audio output\n");
|
||||
printf (" udp for UDP socket blaster output (default host 0.0.0.0 (broadcast) default port 23456)\n");
|
||||
printf (" udp:127.0.0.1:23470 for UDP socket blaster output (Custom Address and Port\n");
|
||||
printf (" udp for UDP socket blaster output (default host 127.0.0.1; default port 23456)\n");
|
||||
printf (" udp:192.168.7.8:23470 for UDP socket blaster output (Target Address and Port\n");
|
||||
printf (" -d <dir> Create mbe data files, use this directory (TDMA version is experimental)\n");
|
||||
printf (" -r <files> Read/Play saved mbe data from file(s)\n");
|
||||
printf (" -g <float> Audio Output Gain (Default: 0 = Auto; )\n");
|
||||
|
|
@ -2658,6 +2658,12 @@ main (int argc, char **argv)
|
|||
|
||||
opts.audio_out_type = 8;
|
||||
|
||||
if (opts.monitor_input_audio == 1 || opts.frame_provoice == 1)
|
||||
{
|
||||
fprintf (stderr, "NOTICE: Raw Audio Monitoring and Analog Calls Unavailable over UDP Audio Output\n");
|
||||
opts.monitor_input_audio = 0;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if((strncmp(opts.audio_out_dev, "pulse", 5) == 0))
|
||||
|
|
|
|||
|
|
@ -337,4 +337,13 @@ int udp_socket_connect(dsd_opts * opts, dsd_state * state)
|
|||
return (err);
|
||||
}
|
||||
|
||||
// For some reason, setting a broadcast to all isn't working
|
||||
// int broadcastEnable = 1;
|
||||
// err = setsockopt(opts->udp_sockfd, SOL_SOCKET, SO_BROADCAST, &broadcastEnable, sizeof(broadcastEnable));
|
||||
// if (err < 0)
|
||||
// {
|
||||
// fprintf (stderr, " UDP Broadcast Set Error \n");
|
||||
// return (err);
|
||||
// }
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue