summaryrefslogtreecommitdiff
path: root/common/netjack_packet.c
diff options
context:
space:
mode:
authorJörn Nettingsmeier <nettings@kleineronkel.villakunterbunt.netz>2009-10-29 19:18:40 +0100
committerTorben Hohn <torbenh@gmx.de>2009-10-29 21:27:34 +0100
commit2ac9617a97dcd81fbe45f6eac3b396bd1be43abd (patch)
treef236c2101ce735b767895f217b5f51d97769db32 /common/netjack_packet.c
parent5ea3a4c9fa7bb62a1c0e9be1b4eef38cfd790344 (diff)
downloadjack2-2ac9617a97dcd81fbe45f6eac3b396bd1be43abd.tar.gz
convert bitdepth magic number into global constant for CELT_MODE, no functional changes
Diffstat (limited to 'common/netjack_packet.c')
-rw-r--r--common/netjack_packet.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/common/netjack_packet.c b/common/netjack_packet.c
index cd51dca9..66adfe28 100644
--- a/common/netjack_packet.c
+++ b/common/netjack_packet.c
@@ -132,7 +132,9 @@ int get_sample_size (int bitdepth)
return sizeof (int8_t);
if (bitdepth == 16)
return sizeof (int16_t);
- if( bitdepth == 1000 )
+ //JN: why? is this for buffer sizes before or after encoding?
+ //JN: if the former, why not int16_t, if the latter, shouldn't it depend on -c N?
+ if( bitdepth == CELT_MODE )
return sizeof( unsigned char );
return sizeof (int32_t);
}
@@ -1504,7 +1506,7 @@ render_payload_to_jack_ports (int bitdepth, void *packet_payload, jack_nframes_t
else if (bitdepth == 16)
render_payload_to_jack_ports_16bit (packet_payload, net_period_down, capture_ports, capture_srcs, nframes);
#if HAVE_CELT
- else if (bitdepth == 1000)
+ else if (bitdepth == CELT_MODE)
render_payload_to_jack_ports_celt (packet_payload, net_period_down, capture_ports, capture_srcs, nframes);
#endif
else
@@ -1519,7 +1521,7 @@ render_jack_ports_to_payload (int bitdepth, JSList *playback_ports, JSList *play
else if (bitdepth == 16)
render_jack_ports_to_payload_16bit (playback_ports, playback_srcs, nframes, packet_payload, net_period_up);
#if HAVE_CELT
- else if (bitdepth == 1000)
+ else if (bitdepth == CELT_MODE)
render_jack_ports_to_payload_celt (playback_ports, playback_srcs, nframes, packet_payload, net_period_up);
#endif
else