summaryrefslogtreecommitdiff
path: root/examples/simple_talker
diff options
context:
space:
mode:
authorJean-Baptiste Maillet <jean-baptiste.maillet@parrot.com>2014-11-28 11:06:54 +0100
committerJean-Baptiste Maillet <jean-baptiste.maillet@parrot.com>2014-11-28 11:06:54 +0100
commit077db82fdd7dc0909452b9a958d923e82bc37b46 (patch)
treeff626cba3d4db13f92702462d5697813b2cd2f16 /examples/simple_talker
parent86fb30d8de54402a44c7f1637f3fdc813696db3d (diff)
downloadOpen-AVB-077db82fdd7dc0909452b9a958d923e82bc37b46.tar.gz
talkers / listeners: minor, macros coding style
Diffstat (limited to 'examples/simple_talker')
-rwxr-xr-xexamples/simple_talker/simple_talker.c26
1 files changed, 13 insertions, 13 deletions
diff --git a/examples/simple_talker/simple_talker.c b/examples/simple_talker/simple_talker.c
index a97c9817..69050748 100755
--- a/examples/simple_talker/simple_talker.c
+++ b/examples/simple_talker/simple_talker.c
@@ -50,25 +50,25 @@
#define VERSION_STR "1.0"
-#define SHM_SIZE 4*8 + sizeof(pthread_mutex_t) /* 3 - 64 bit and 2 - 32 bits */
+#define SHM_SIZE (4 * 8 + sizeof(pthread_mutex_t)) /* 3 - 64 bit and 2 - 32 bits */
#define SHM_NAME "/ptp"
-#define MAX_SAMPLE_VALUE ((1U << ((sizeof(int32_t)*8)-1))-1)
+#define MAX_SAMPLE_VALUE ((1U << ((sizeof(int32_t) * 8) -1)) -1)
#define SRC_CHANNELS (2)
-#define GAIN (.5)
-#define L16_PAYLOAD_TYPE 96 /* for layer 4 transport - should be negotiated via RTSP */
-#define ID_B_HDR_EXT_ID 0 /* for layer 4 transport - should be negotiated via RTSP */
-#define L2_SAMPLES_PER_FRAME 6
-#define L4_SAMPLES_PER_FRAME 60
-#define L4_SAMPLE_SIZE 2
-#define CHANNELS 2
-#define RTP_SUBNS_SCALE_NUM 20000000
-#define RTP_SUBNS_SCALE_DEN 4656613
-#define IGB_BIND_NAMESZ 24
+#define GAIN (0.5)
+#define L16_PAYLOAD_TYPE (96) /* for layer 4 transport - should be negotiated via RTSP */
+#define ID_B_HDR_EXT_ID (0) /* for layer 4 transport - should be negotiated via RTSP */
+#define L2_SAMPLES_PER_FRAME (6)
+#define L4_SAMPLES_PER_FRAME (60)
+#define L4_SAMPLE_SIZE (2)
+#define CHANNELS (2)
+#define RTP_SUBNS_SCALE_NUM (20000000)
+#define RTP_SUBNS_SCALE_DEN (4656613)
+#define IGB_BIND_NAMESZ (24)
#define XMIT_DELAY (200000000) /* us */
#define RENDER_DELAY (XMIT_DELAY+2000000) /* us */
#define L2_PACKET_IPG (125000) /* (1) packet every 125 usec */
#define L4_PACKET_IPG (1250000) /* (1) packet every 1.25 millisec */
-#define PKT_SZ 100
+#define PKT_SZ (100)
typedef struct {
int64_t ml_phoffset;