Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/quite/celt.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorGregory Maxwell <greg@xiph.org>2008-10-01 02:20:14 +0400
committerJean-Marc Valin <jean-marc.valin@usherbrooke.ca>2008-10-01 07:32:35 +0400
commit82595311602a327dc52aef96e0ed151b4ae5046b (patch)
tree347ef4b711aa39859ba4d70d3b70f9dfbc1abccb /tools
parentc18fb1d0314e386ee07e80048c2dd1de625c017d (diff)
API: Change celt_encode and celt_encode_float so that they take an optional synthesis parameter after the PCM input. If optional_synthesis is null the encoder will be able to save some computation. If optional_synthesis is non-null if will be used to write the encoder's expectation of the decoder's output. Synthesis may alias the input pcm, so calling the encoder with the same buffer twice will achieve the old behavior. Remove 'restrict' from the CTL prototype.
Diffstat (limited to 'tools')
-rw-r--r--tools/celtclient.c4
-rw-r--r--tools/celtenc.c2
2 files changed, 3 insertions, 3 deletions
diff --git a/tools/celtclient.c b/tools/celtclient.c
index 39d27fb..cdae955 100644
--- a/tools/celtclient.c
+++ b/tools/celtclient.c
@@ -116,7 +116,7 @@ int main(int argc, char *argv[])
}
/* Setup audio device */
- audio_dev = alsa_device_open(argv[1], SAMPLING_RATE, 1, FRAME_SIZE);
+ audio_dev = alsa_device_open(argv[1], SAMPLING_RATE, 2, FRAME_SIZE);
/* Setup the encoder and decoder in wideband */
CELTEncoder *enc_state;
@@ -210,7 +210,7 @@ int main(int argc, char *argv[])
pcm[i] = pcm2[i];
/* Encode */
- celt_encode(enc_state, pcm, outpacket+4, packetSize);
+ celt_encode(enc_state, pcm, NULL, outpacket+4, packetSize);
/* Pseudo header: four null bytes and a 32-bit timestamp */
((int*)outpacket)[0] = send_timestamp;
diff --git a/tools/celtenc.c b/tools/celtenc.c
index e8ecafb..f6b1e5c 100644
--- a/tools/celtenc.c
+++ b/tools/celtenc.c
@@ -598,7 +598,7 @@ int main(int argc, char **argv)
id++;
/*Encode current frame*/
- nbBytes = celt_encode(st, input, bits, bytes_per_packet);
+ nbBytes = celt_encode(st, input, NULL, bits, bytes_per_packet);
if (nbBytes<0)
{
fprintf(stderr, "Got error %d while encoding. Aborting.\n", nbBytes);