summaryrefslogtreecommitdiffstats
path: root/src/odr-audioenc.cpp
diff options
context:
space:
mode:
authorMatthias P. Braendli <matthias.braendli@mpb.li>2019-07-03 15:48:30 +0200
committerMatthias P. Braendli <matthias.braendli@mpb.li>2019-07-03 15:48:30 +0200
commit36219517c52ad97ab96545c9289b82890861d77b (patch)
tree7d1f73ac9c3c0009df86ef4210ecba6f39b90bd8 /src/odr-audioenc.cpp
parente7a9a94fb8ebd50e10ed403ef871620181d3aa1d (diff)
downloadODR-AudioEnc-36219517c52ad97ab96545c9289b82890861d77b.tar.gz
ODR-AudioEnc-36219517c52ad97ab96545c9289b82890861d77b.tar.bz2
ODR-AudioEnc-36219517c52ad97ab96545c9289b82890861d77b.zip
Enable -Wall and fix a few warnings
Diffstat (limited to 'src/odr-audioenc.cpp')
-rw-r--r--src/odr-audioenc.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/odr-audioenc.cpp b/src/odr-audioenc.cpp
index 09dceb5..6b82c5f 100644
--- a/src/odr-audioenc.cpp
+++ b/src/odr-audioenc.cpp
@@ -909,7 +909,7 @@ int AudioEnc::run()
/*! pop_wait() must return after a timeout, otherwise the silence detector cannot do
* its job. */
- size_t bytes_from_queue = queue.pop_wait(&input_buf[0], read_bytes, timeout_ms, &overruns); // returns bytes
+ ssize_t bytes_from_queue = queue.pop_wait(&input_buf[0], read_bytes, timeout_ms, &overruns); // returns bytes
if (overruns) {
throw logic_error("Queue overrun in non-drift compensation!");
@@ -1009,7 +1009,6 @@ int AudioEnc::run()
//
int in_identifier[] = {IN_AUDIO_DATA, IN_ANCILLRY_DATA};
int out_identifier = OUT_BITSTREAM_DATA;
- const int subchannel_index = bitrate / 8;
void *in_ptr[2], *out_ptr;
int in_size[2], in_elem_size[2];
@@ -1133,7 +1132,7 @@ int AudioEnc::run()
toolame_buffer.insert(toolame_buffer.end(), outbuf.begin(), outbuf.begin() + numOutBytes);
// ODR-DabMux expects frames of length 3*bitrate
- const auto frame_len = 3 * bitrate;
+ const size_t frame_len = 3 * bitrate;
while (toolame_buffer.size() > frame_len) {
vec_u8 frame(frame_len);
// this is probably not very efficient