Commit f96506ba authored by schreibfaul1's avatar schreibfaul1

typing short -> int16_t, long int32_t

parent 6c50184e
......@@ -4,7 +4,7 @@
* Created on: Oct 26.2018
*
* Version 3.0.9l
* Updated on: May 18.2024
* Updated on: May 22.2024
* Author: Wolle (schreibfaul1)
*
*/
......@@ -4447,7 +4447,7 @@ int Audio::sendBytes(uint8_t* data, size_t len) {
case CODEC_AAC: m_decodeError = AACDecode(data, &bytesLeft, m_outBuff); break;
case CODEC_M4A: m_decodeError = AACDecode(data, &bytesLeft, m_outBuff); break;
case CODEC_FLAC: m_decodeError = FLACDecode(data, &bytesLeft, m_outBuff); break;
case CODEC_OPUS: m_decodeError = OPUSDecode(data, (int*)&bytesLeft, m_outBuff); break;
case CODEC_OPUS: m_decodeError = OPUSDecode(data, &bytesLeft, m_outBuff); break;
case CODEC_VORBIS: m_decodeError = VORBISDecode(data, (int*)&bytesLeft, m_outBuff); break;
default: {
log_e("no valid codec found codec = %d", m_codec);
......
......@@ -1979,7 +1979,7 @@ int32_t celt_decoder_init(int32_t channels){
return ERR_OPUS_CELT_ALLOC_FAIL;
}
int n = celt_decoder_get_size(channels);
int32_t n = celt_decoder_get_size(channels);
memset(s_celtDec, 0, n * sizeof(char));
s_celtDec->channels = channels;
......@@ -2004,7 +2004,7 @@ int32_t celt_decoder_init(int32_t channels){
s_celtDec->_decode_mem[0] = 0;
s_celtDec->end = s_celtDec->mode->effEBands; // 21
int ret = celt_decoder_ctl(OPUS_RESET_STATE);
int32_t ret = celt_decoder_ctl(OPUS_RESET_STATE);
if(ret < 0) return ret;
return ERR_OPUS_NONE;
}
......@@ -2507,7 +2507,7 @@ int32_t celt_decoder_ctl(int32_t request, ...) {
oldLogE = oldBandE + 2 * s_celtDec->mode->nbEBands;
oldLogE2 = oldLogE + 2 * s_celtDec->mode->nbEBands;
int n = celt_decoder_get_size(s_celtDec->channels);
int32_t n = celt_decoder_get_size(s_celtDec->channels);
char* dest = (char*)&s_celtDec->rng;
char* offset = (char*)s_celtDec;
memset(dest, 0, n - (dest - offset) * sizeof(s_celtDec));
......
......@@ -457,7 +457,7 @@ inline void dual_inner_prod(const int16_t *x, const int16_t *y01, const int16_t
}
inline uint32_t celt_inner_prod(const int16_t *x, const int16_t *y, int32_t N) {
int i;
int32_t i;
uint32_t xy = 0;
for (i = 0; i < N; i++) xy = (int32_t)x[i] * (int32_t)y[i] + xy;
return xy;
......
This diff is collapsed.
......@@ -36,13 +36,13 @@ bool OPUSDecoder_AllocateBuffers();
void OPUSDecoder_FreeBuffers();
void OPUSDecoder_ClearBuffers();
void OPUSsetDefaults();
int OPUSDecode(uint8_t* inbuf, int* bytesLeft, short* outbuf);
int opusDecodePage0(uint8_t* inbuf, int* bytesLeft, uint32_t segmentLength);
int opusDecodePage3(uint8_t* inbuf, int* bytesLeft, uint32_t segmentLength, short *outbuf);
int8_t opus_FramePacking_Code0(uint8_t *inbuf, int *bytesLeft, short *outbuf, int packetLen, uint16_t samplesPerFrame);
int8_t opus_FramePacking_Code1(uint8_t *inbuf, int *bytesLeft, short *outbuf, int packetLen, uint16_t samplesPerFrame, uint8_t* frameCount);
int8_t opus_FramePacking_Code2(uint8_t *inbuf, int *bytesLeft, short *outbuf, int packetLen, uint16_t samplesPerFrame, uint8_t* frameCount);
int8_t opus_FramePacking_Code3(uint8_t *inbuf, int *bytesLeft, short *outbuf, int packetLen, uint16_t samplesPerFrame, uint8_t* frameCount);
int32_t OPUSDecode(uint8_t* inbuf, int32_t* bytesLeft, short* outbuf);
int32_t opusDecodePage0(uint8_t* inbuf, int32_t* bytesLeft, uint32_t segmentLength);
int32_t opusDecodePage3(uint8_t* inbuf, int32_t* bytesLeft, uint32_t segmentLength, short *outbuf);
int8_t opus_FramePacking_Code0(uint8_t *inbuf, int32_t *bytesLeft, short *outbuf, int32_t packetLen, uint16_t samplesPerFrame);
int8_t opus_FramePacking_Code1(uint8_t *inbuf, int32_t *bytesLeft, short *outbuf, int32_t packetLen, uint16_t samplesPerFrame, uint8_t* frameCount);
int8_t opus_FramePacking_Code2(uint8_t *inbuf, int32_t *bytesLeft, short *outbuf, int32_t packetLen, uint16_t samplesPerFrame, uint8_t* frameCount);
int8_t opus_FramePacking_Code3(uint8_t *inbuf, int32_t *bytesLeft, short *outbuf, int32_t packetLen, uint16_t samplesPerFrame, uint8_t* frameCount);
uint8_t OPUSGetChannels();
uint32_t OPUSGetSampRate();
uint8_t OPUSGetBitsPerSample();
......@@ -51,12 +51,12 @@ uint16_t OPUSGetOutputSamps();
uint32_t OPUSGetAudioDataStart();
char* OPUSgetStreamTitle();
vector<uint32_t> OPUSgetMetadataBlockPicture();
int OPUSFindSyncWord(unsigned char* buf, int nBytes);
int OPUSparseOGG(uint8_t* inbuf, int* bytesLeft);
int parseOpusHead(uint8_t* inbuf, int nBytes);
int parseOpusComment(uint8_t* inbuf, int nBytes);
int32_t OPUSFindSyncWord(unsigned char* buf, int32_t nBytes);
int32_t OPUSparseOGG(uint8_t* inbuf, int32_t* bytesLeft);
int32_t parseOpusHead(uint8_t* inbuf, int32_t nBytes);
int32_t parseOpusComment(uint8_t* inbuf, int32_t nBytes);
int8_t parseOpusTOC(uint8_t TOC_Byte);
int32_t opus_packet_get_samples_per_frame(const uint8_t* data, int32_t Fs);
// some helper functions
int OPUS_specialIndexOf(uint8_t* base, const char* str, int baselen, bool exact = false);
int32_t OPUS_specialIndexOf(uint8_t* base, const char* str, int32_t baselen, bool exact = false);
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment